1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

LibELF+LibCoreDump: Add a Metadata notes entry

This is a new NotesEntry type which will allow applications to embed
arbitrary metadata in crashdumps (stored as a JSON string). It will be
used to store an assertion message, for example.
This commit is contained in:
Linus Groh 2020-12-30 15:06:33 +01:00 committed by Andreas Kling
parent aa941a31ed
commit 7413a7c509
3 changed files with 42 additions and 2 deletions

View file

@ -39,6 +39,7 @@ struct [[gnu::packed]] NotesEntryHeader
ProcessInfo,
ThreadInfo,
MemoryRegionInfo,
Metadata,
};
Type type;
};
@ -82,4 +83,10 @@ struct [[gnu::packed]] MemoryRegionInfo
}
};
struct [[gnu::packed]] Metadata
{
NotesEntryHeader header;
char json_data[]; // Null terminated
};
}