mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-18 00:52:57 +00:00
HackStudio: Make debugger support shared libraries
This commit is contained in:
parent
dcdb68a013
commit
94db04fc12
Notes:
sideshowbarker
2024-07-19 00:02:20 +09:00
Author: https://github.com/itamar8910
Commit: 94db04fc12
Pull-request: https://github.com/SerenityOS/serenity/pull/4852
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/awesomekling
7 changed files with 55 additions and 21 deletions
|
@ -57,7 +57,10 @@ Vector<BacktraceModel::FrameInfo> BacktraceModel::create_backtrace(const Debug::
|
|||
u32 current_instruction = regs.eip;
|
||||
Vector<BacktraceModel::FrameInfo> frames;
|
||||
do {
|
||||
String name = debug_session.debug_info().name_of_containing_function(current_instruction);
|
||||
auto lib = debug_session.library_at(regs.eip);
|
||||
if (!lib)
|
||||
continue;
|
||||
String name = lib->debug_info->name_of_containing_function(current_instruction - lib->base_address);
|
||||
if (name.is_null()) {
|
||||
dbgln("BacktraceModel: couldn't find containing function for address: {:p}", current_instruction);
|
||||
name = "<missing>";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue