Changeset 40eab9f in mainline for kernel/generic/src/debug/stacktrace.c
- Timestamp:
- 2023-11-03T18:47:41Z (15 months ago)
- Branches:
- master, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b1397ab
- Parents:
- dcd8214
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-11-03 18:46:22)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-11-03 18:47:41)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/debug/stacktrace.c
rdcd8214 r40eab9f 60 60 int column = 0; 61 61 62 /* 63 * If this isn't the first frame, move pc back by one byte to read the 64 * position of the call instruction, not the return address. 65 */ 66 pc = cnt == 1 ? ctx->pc : ctx->pc - 1; 67 62 68 if (ops->symbol_resolve && 63 ops->symbol_resolve( ctx->pc, 0, &symbol, &symbol_addr, &file_name, &dir_name, &line, &column)) {69 ops->symbol_resolve(pc, 0, &symbol, &symbol_addr, &file_name, &dir_name, &line, &column)) { 64 70 65 71 if (symbol == NULL) … … 130 136 { 131 137 *symbol_addr = 0; 132 *symbol = symtab_name_lookup(addr, symbol_addr );138 *symbol = symtab_name_lookup(addr, symbol_addr, &kernel_sections); 133 139 134 return debug_line_get_address_info(addr, op_index, filename, dirname, line, column) || *symbol_addr != 0; 140 return debug_line_get_address_info(&kernel_sections, addr, op_index, filename, dirname, line, column) || *symbol_addr != 0; 141 } 142 143 static bool 144 resolve_uspace_address(uintptr_t addr, int op_index, 145 const char **symbol, uintptr_t *symbol_addr, 146 const char **filename, const char **dirname, 147 int *line, int *column) 148 { 149 if (TASK->debug_sections == NULL) 150 return false; 151 152 debug_sections_t *scs = TASK->debug_sections; 153 154 *symbol_addr = 0; 155 *symbol = symtab_name_lookup(addr, symbol_addr, scs); 156 157 return debug_line_get_address_info(scs, addr, op_index, filename, dirname, line, column) || *symbol_addr != 0; 135 158 } 136 159 … … 146 169 .frame_pointer_prev = uspace_frame_pointer_prev, 147 170 .return_address_get = uspace_return_address_get, 148 .symbol_resolve = NULL171 .symbol_resolve = resolve_uspace_address, 149 172 }; 150 173
Note:
See TracChangeset
for help on using the changeset viewer.