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

UserspaceEmulator: Prefix MmapRegions' name with '(UE)'

When printing a backtrace, each library's base address is found by
walking through all memory regions in the coredump, and selecting the
address of the first region whose name begins with the library's soname.
This is done to support the Clang toolchain, where .text is not at
offset 0.

However, because the libraries loaded by the emulated process used the
same names, we could not distinguish those with the ones used by
UserspaceEmulator, so the backtrace ended up being garbage.

Using the libraries mapped by UE would not be a sufficient, as the
running application could ask for other libraries too, and doing away
with setting names would make debugging issues within UE code more
difficult.
This commit is contained in:
Daniel Bertalan 2021-08-14 10:56:40 +02:00 committed by Andreas Kling
parent 0847ad9ca0
commit bfe5509a28
2 changed files with 9 additions and 3 deletions

View file

@ -61,7 +61,7 @@ public:
return {};
return m_name.substring(0, *maybe_separator);
}
void set_name(String name) { m_name = move(name); }
void set_name(String name);
private:
MmapRegion(u32 base, u32 size, int prot, u8* data, u8* shadow_data);