1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 03:08:13 +00:00
serenity/Userland
Itamar c78838c2d2 LibDebug: Use the first memory segment of a library as the ELF's base
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).
2021-09-10 13:57:34 +00:00
..
Applets AudioApplet: Fix initial mute state 2021-09-04 21:01:28 +02:00
Applications PixelPaint: Add Fit Image To View action 2021-09-09 11:35:50 +02:00
Demos CatDog: Switch to new mouse-tracking method 2021-09-08 10:53:49 +02:00
DevTools HackStudio: Reuse TextDocument::is_modified() 2021-09-10 00:00:53 +02:00
DynamicLoader CMake: Let Meta/serenity.sh run aarch64 make it past cmake 2021-08-28 14:43:07 +01:00
Games Pong: Switch to global tracking 2021-09-08 23:59:08 +02:00
Libraries LibDebug: Use the first memory segment of a library as the ELF's base 2021-09-10 13:57:34 +00:00
Services LibWeb: Rename DOM::Window::document() => associated_document() 2021-09-09 21:25:10 +02:00
Shell Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
Utilities Everywhere: Behaviour => Behavior 2021-09-07 13:53:14 +02:00
CMakeLists.txt Tests: Establish root Tests directory, move Userland/Tests there 2021-05-06 17:54:28 +02:00