diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-07-11 14:02:17 +0100 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-08-12 15:08:23 +0100 |
commit | 8fbac78b147290e696f04029ecc7ebab3a64e97d (patch) | |
tree | 4f90d8d59b6976486c6fbc13c3fd28341f656aee /bfd | |
parent | ff2084b9ef793b98241c6801217d3c3465baabbe (diff) | |
download | gdb-8fbac78b147290e696f04029ecc7ebab3a64e97d.zip gdb-8fbac78b147290e696f04029ecc7ebab3a64e97d.tar.gz gdb-8fbac78b147290e696f04029ecc7ebab3a64e97d.tar.bz2 |
Define constants for win32pstatus ELF notes
Define constants for win32pstatus ELF notes, as they were prior to
4a6636fb, and say what specifies them.
bfd/ChangeLog:
2020-07-11 Jon Turney <jon.turney@dronecode.org.uk>
* elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define.
(elfcore_grok_win32pstatus): Use.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f6ded67..84b2905 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-07-11 Jon Turney <jon.turney@dronecode.org.uk> + + * elf.c (NOTE_INFO{_PROCESS,_THREAD,_MODULE}): Define. + (elfcore_grok_win32pstatus): Use. + 2020-07-01 Jon Turney <jon.turney@dronecode.org.uk> * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read @@ -10127,6 +10127,12 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) } #endif /* defined (HAVE_LWPSTATUS_T) */ +/* These constants, and the structure offsets used below, are defined by + Cygwin's core_dump.h */ +#define NOTE_INFO_PROCESS 1 +#define NOTE_INFO_THREAD 2 +#define NOTE_INFO_MODULE 3 + static bfd_boolean elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) { @@ -10148,15 +10154,13 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) switch (type) { - case 1 /* NOTE_INFO_PROCESS */: + case NOTE_INFO_PROCESS: /* FIXME: need to add ->core->command. */ - /* process_info.pid */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 4); - /* process_info.signal */ elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 8); break; - case 2 /* NOTE_INFO_THREAD */: + case NOTE_INFO_THREAD: /* Make a ".reg/<tid>" section containing the Win32 API thread CONTEXT structure. */ /* thread_info.tid */ @@ -10187,7 +10191,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) return FALSE; break; - case 3 /* NOTE_INFO_MODULE */: + case NOTE_INFO_MODULE: /* Make a ".module/xxxxxxxx" section. */ /* module_info.base_address */ base_addr = bfd_get_32 (abfd, note->descdata + 4); |