+2020-07-01 Jon Turney <jon.turney@dronecode.org.uk>
+
+ * elf.c (elfcore_grok_win32pstatus): Fix the offset used to read
+ the tid from a win32pstatus NOTE_INFO_THREAD ELF note. Fix
+ offsets used to read NOTE_INFO_PROCESS.
+
2020-08-12 Nick Clifton <nickc@redhat.com>
* po/ru.po: Updated Russian translation.
case 1 /* NOTE_INFO_PROCESS */:
/* FIXME: need to add ->core->command. */
/* process_info.pid */
- elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 8);
+ 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 + 12);
+ elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 8);
break;
case 2 /* NOTE_INFO_THREAD */:
- /* Make a ".reg/999" section. */
+ /* Make a ".reg/<tid>" section containing the Win32 API thread CONTEXT
+ structure. */
/* thread_info.tid */
- sprintf (buf, ".reg/%ld", (long) bfd_get_32 (abfd, note->descdata + 8));
+ sprintf (buf, ".reg/%ld", (long) bfd_get_32 (abfd, note->descdata + 4));
len = strlen (buf) + 1;
name = (char *) bfd_alloc (abfd, len);