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

Profiler: Symbolicate addresses in non-PIE ELF objects

This is a little bit messy, but basically if an ELF object is non-PIE,
we have to account for the executable mapping being at a hard-coded
offset and subtract that when doing symbolication.

There's probably a nicer way to solve this, I just hacked this together
so we can see "cc1plus" and friends in profiles. :^)
This commit is contained in:
Andreas Kling 2021-03-03 22:59:45 +01:00
parent 538975b713
commit 373a595c56
2 changed files with 20 additions and 6 deletions

View file

@ -59,7 +59,10 @@ public:
FlatPtr base;
size_t size;
String name;
FlatPtr text_base;
MappedObject* object { nullptr };
String symbolicate(FlatPtr, u32* offset) const;
};
const Library* library_containing(FlatPtr) const;