mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:27:35 +00:00
LibCoreDump: Include source locations of inlined functions in backtrace
This commit is contained in:
parent
a45b5ccd96
commit
03ef2a479a
5 changed files with 46 additions and 8 deletions
|
@ -74,8 +74,20 @@ static void print_backtrace(const String& coredump_path)
|
|||
if (thread_index > 0)
|
||||
dbgln();
|
||||
dbgln("--- Backtrace for thread #{} (TID {}) ---", thread_index, thread_info.tid);
|
||||
for (auto& entry : backtrace.entries())
|
||||
for (auto& entry : backtrace.entries()) {
|
||||
#ifndef BACKTRACE_DEBUG
|
||||
dbgln("{}", entry.to_string(true));
|
||||
#else
|
||||
auto region = coredump->region_containing(entry.eip);
|
||||
String name;
|
||||
u32 base_addr { 0 };
|
||||
if (region) {
|
||||
name = region->region_name;
|
||||
base_addr = region->region_start;
|
||||
}
|
||||
dbgln("{} ({} base: {:p}, offset: {:p})", entry.to_string(true), name, base_addr, entry.eip - base_addr);
|
||||
#endif
|
||||
}
|
||||
++thread_index;
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue