1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

HackStudio: Improve backtrace accuracy

We now decrement the return address of the previous frame by one to get
the address of the call instruction and use this address in the
backtrace.

This results in more accurate source position information than what we
previously had when using the return address.
This commit is contained in:
Itamar 2021-11-19 16:13:07 +02:00 committed by Linus Groh
parent d6d48ce936
commit ce726fe027
2 changed files with 16 additions and 6 deletions

View file

@ -38,8 +38,9 @@ public:
struct FrameInfo {
String function_name;
FlatPtr instruction_address;
FlatPtr frame_base;
FlatPtr instruction_address { 0 };
FlatPtr frame_base { 0 };
Optional<Debug::DebugInfo::SourcePosition> m_source_position;
};
const Vector<FrameInfo>& frames() const { return m_frames; }