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

LibDebug+HackStudio: Fix crashes relating to debugger variable preview

For one, viewing a variable who's type contained a subprogram will
no longer crash HackStudio. Additionally, the variable view will
handle invalid enum values gracefully now, fixing another crash.
Finally, deeply nested (nest count > 1) structures will have their
memory addresses properly set, fixing the final crash I found.
This commit is contained in:
FalseHonesty 2021-04-12 01:30:57 -04:00 committed by Andreas Kling
parent c778164f64
commit d295095993
3 changed files with 10 additions and 9 deletions

View file

@ -140,7 +140,7 @@ private:
void prepare_variable_scopes();
void prepare_lines();
void parse_scopes_impl(const Dwarf::DIE& die);
OwnPtr<VariableInfo> create_variable_info(const Dwarf::DIE& variable_die, const PtraceRegisters&) const;
OwnPtr<VariableInfo> create_variable_info(const Dwarf::DIE& variable_die, const PtraceRegisters&, u32 address_offset = 0) const;
NonnullOwnPtr<const ELF::Image> m_elf;
String m_source_root;