From 6420dd27cb8ee2c89c379255ba4c438d22376bc4 Mon Sep 17 00:00:00 2001 From: Libor Bukata Date: Wed, 14 Jul 2021 11:53:56 +0200 Subject: Add Solaris specific ELF note processing Add elfcore_grok_solaris_note function that enables to obtain process status, register values, and program info from Solaris's core files. bfd/ * elf.c (elfcore_grok_solaris_note): Solaris specific ELF note parser. Better GDB's coredump analysis on Solaris... (elfcore_grok_solaris_note_impl): New function. (elfcore_grok_solaris_prstatus): New function. (elfcore_grok_solaris_info): New function. (elfcore_grok_solaris_lwpstatus): New function. (elf_parse_notes): Added "CORE" groker element. include/ * elf/common.h: Add note segment constants for core files on Solaris systems. --- include/elf/common.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'include') diff --git a/include/elf/common.h b/include/elf/common.h index ebfb554..efb7ff0 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -742,6 +742,29 @@ #define NT_OPENBSD_WCOOKIE 23 +/* Note segments for core files on Solaris systems. Note name + must start with "CORE". */ +#define SOLARIS_NT_PRSTATUS 1 +#define SOLARIS_NT_PRFPREG 2 +#define SOLARIS_NT_PRPSINFO 3 +#define SOLARIS_NT_PRXREG 4 +#define SOLARIS_NT_PLATFORM 5 +#define SOLARIS_NT_AUXV 6 +#define SOLARIS_NT_GWINDOWS 7 +#define SOLARIS_NT_ASRS 8 +#define SOLARIS_NT_LDT 9 +#define SOLARIS_NT_PSTATUS 10 +#define SOLARIS_NT_PSINFO 13 +#define SOLARIS_NT_PRCRED 14 +#define SOLARIS_NT_UTSNAME 15 +#define SOLARIS_NT_LWPSTATUS 16 +#define SOLARIS_NT_LWPSINFO 17 +#define SOLARIS_NT_PRPRIV 18 +#define SOLARIS_NT_PRPRIVINFO 19 +#define SOLARIS_NT_CONTENT 20 +#define SOLARIS_NT_ZONENAME 21 +#define SOLARIS_NT_PRCPUXREG 22 + /* Note segments for core files on SPU systems. Note name must start with "SPU/". */ -- cgit v1.1