diff options
author | Felix Willgerodt <felix.willgerodt@intel.com> | 2023-02-27 13:01:06 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2023-02-27 13:01:06 +0000 |
commit | c38463074e08a6443a283215d7899d71480715d0 (patch) | |
tree | b33b282af9147c5dd4c5c979f0118957bdf08331 /bfd | |
parent | 85b922fcdd98971dd859fe7452dd6f0a71b484e5 (diff) | |
download | gdb-c38463074e08a6443a283215d7899d71480715d0.zip gdb-c38463074e08a6443a283215d7899d71480715d0.tar.gz gdb-c38463074e08a6443a283215d7899d71480715d0.tar.bz2 |
Fix missing "Core was generated by" when loading a x32 corefile.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf64-x86-64.c | 16 |
2 files changed, 19 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 50e1e17..cac222c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2023-02-27 Felix Willgerodt <felix.willgerodt@intel.com> + + * elf64-x86-64.c (elf_x86_64_grok_psinfo): Check for + elf_external_linux_prpsinfo32_ugid32. + 2023-02-23 Fangrui Song <i@maskray.me> * elfnn-riscv.c (struct riscv_elf_link_hash_table): Add params. diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index ef0ebdd..0aa9af5 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -389,7 +389,8 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) default: return false; - case 124: /* sizeof(struct elf_prpsinfo) on Linux/x32 */ + case 124: + /* sizeof (struct elf_external_linux_prpsinfo32_ugid16). */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 12); elf_tdata (abfd)->core->program @@ -398,7 +399,18 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80); break; - case 136: /* sizeof(struct elf_prpsinfo) on Linux/x86_64 */ + case 128: + /* sizeof (struct elf_external_linux_prpsinfo32_ugid32). */ + elf_tdata (abfd)->core->pid + = bfd_get_32 (abfd, note->descdata + 12); + elf_tdata (abfd)->core->program + = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16); + elf_tdata (abfd)->core->command + = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80); + break; + + case 136: + /* sizeof (struct elf_prpsinfo) on Linux/x86_64. */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24); elf_tdata (abfd)->core->program |