1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

LibCoredump: Add stack frame entry even if there is no object info

We know the object name and are able to include it. Function name and
source position are still unknown and will just be displayed as "??? ()"
This commit is contained in:
Maciej 2022-02-04 19:43:29 +01:00 committed by Andreas Kling
parent 394227b2f9
commit 6df246091b

View file

@ -117,8 +117,10 @@ void Backtrace::add_entry(const Reader& coredump, FlatPtr ip)
// in the object file. // in the object file.
auto region = coredump.first_region_for_object(object_name); auto region = coredump.first_region_for_object(object_name);
auto object_info = object_info_for_region(*region); auto object_info = object_info_for_region(*region);
if (!object_info) if (!object_info) {
m_entries.append({ ip, object_name, {}, {} });
return; return;
}
auto function_name = object_info->debug_info->elf().symbolicate(ip - region->region_start); auto function_name = object_info->debug_info->elf().symbolicate(ip - region->region_start);
auto source_position = object_info->debug_info->get_source_position_with_inlines(ip - region->region_start); auto source_position = object_info->debug_info->get_source_position_with_inlines(ip - region->region_start);