mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:57:34 +00:00
LibELF: Refactor coredump notes section structures
This commit is contained in:
parent
f12e13e81c
commit
349c6780ce
3 changed files with 17 additions and 12 deletions
|
@ -25,12 +25,13 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <LibC/sys/arch/i386/regs.h>
|
||||
|
||||
namespace ELF::Core {
|
||||
|
||||
struct [[gnu::packed]] NotesEntry
|
||||
struct [[gnu::packed]] NotesEntryHeader
|
||||
{
|
||||
enum Type : u8 {
|
||||
Null = 0, // Terminates segment
|
||||
|
@ -38,21 +39,28 @@ struct [[gnu::packed]] NotesEntry
|
|||
MemoryRegionInfo,
|
||||
};
|
||||
Type type;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] NotesEntry
|
||||
{
|
||||
NotesEntryHeader header;
|
||||
char data[];
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] ThreadInfo
|
||||
{
|
||||
NotesEntryHeader header;
|
||||
int tid;
|
||||
PtraceRegisters regs;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] MemoryRegionInfo
|
||||
{
|
||||
uint32_t region_start {};
|
||||
NotesEntryHeader header;
|
||||
uint32_t region_start;
|
||||
uint32_t region_end;
|
||||
uint16_t program_header_index;
|
||||
char file_name[];
|
||||
char region_name[]; // Null terminated
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue