Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arch/x86/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void print_callstack(const void *sp, const void *ip) {

printk("CALLSTACK:\n");
print_symbol(ip);
for (int i = 0; _ul(&_sp[i]) % PAGE_SIZE_2M; i++)
for (int i = 0; _ul(&_sp[i]) % PAGE_SIZE; i++)
print_symbol(_ptr(_sp[i]));
printk("\n");
}
Expand Down
2 changes: 1 addition & 1 deletion common/symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static inline bool is_symbol_address(const void *addr, unsigned index) {
static long symbol_index_by_address(const void *addr) {
unsigned left, right;

if (!in_text_section(addr))
if (!in_text_section(addr) && !in_user_text_section(addr))
return -1;

left = 0;
Expand Down
4 changes: 4 additions & 0 deletions include/mm/regions.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ static inline bool in_text_section(const void *addr) {
(addr >= _ptr(__start_text_init) && addr < _ptr(__end_text_init));
}

static inline bool in_user_text_section(const void *addr) {
return (addr >= _ptr(__start_text_user) && addr < _ptr(__end_text_user));
}

static inline bool in_init_section(const void *addr) {
return (addr >= _ptr(__start_text_init) && addr < _ptr(__end_text_init)) ||
(addr >= _ptr(__start_data_init) && addr < _ptr(__end_data_init)) ||
Expand Down