mirror of
https://github.com/RGBCube/serenity
synced 2025-10-24 12:32:06 +00:00
When parsing the libraries of the debugee process, we previously assumed that the region that's called `<library name>: .text` was also the base of the ELF file. However, since we started linking with `-z separate-code`, this is no longer the case - our executables have a read-only segment before the .text segment, and that segment is actually at the base of the ELF. This broke inserting breakpoints with the debugger since they were inserted at a wrong offset. To fix that, we now use the address of the first segment in the memory map for the ELF's base address (The memory map is sorted by address). |
||
|---|---|---|
| .. | ||
| Dwarf | ||
| CMakeLists.txt | ||
| DebugInfo.cpp | ||
| DebugInfo.h | ||
| DebugSession.cpp | ||
| DebugSession.h | ||
| StackFrameUtils.cpp | ||
| StackFrameUtils.h | ||