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

LibELF+LibCoreDump: Add a ProcessInfo notes entry

This is a new NotesEntry type which contains information related to the
coredump's process:

- PID
- executable path

Having these in the coredump explicitly avoids having to parse them from
the coredump filename and backtrace, respectively.
This commit is contained in:
Linus Groh 2020-12-30 13:18:32 +01:00 committed by Andreas Kling
parent 9227e66bb4
commit a28954a882
3 changed files with 39 additions and 9 deletions

View file

@ -36,6 +36,7 @@ struct [[gnu::packed]] NotesEntryHeader
{
enum Type : u8 {
Null = 0, // Terminates segment
ProcessInfo,
ThreadInfo,
MemoryRegionInfo,
};
@ -48,6 +49,13 @@ struct [[gnu::packed]] NotesEntry
char data[];
};
struct [[gnu::packed]] ProcessInfo
{
NotesEntryHeader header;
int pid;
char executable_path[]; // Null terminated
};
struct [[gnu::packed]] ThreadInfo
{
NotesEntryHeader header;