This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] aarch64: correct a size of struct elf_prstatus
- From: AKASHI Takahiro <takahiro dot akashi at linaro dot org>
- To: gdb-patches at sourceware dot org
- Cc: will dot deacon at arm dot com, dsaxena at linaro dot org, yufeng dot zhang at arm dot com, AKASHI Takahiro <takahiro dot akashi at linaro dot org>
- Date: Mon, 23 Feb 2015 10:08:01 +0900
- Subject: [PATCH] aarch64: correct a size of struct elf_prstatus
- Authentication-results: sourceware.org; auth=none
When gdb reads a vmcore file that kdump generated, it fails, saying
warning: Couldn't find general-purpose registers in core file.
This is because elf64_aarch64_grok_prstatus() fails to read a note section
in a vmcore file due to a wrong size of struct elf_prstatus. The following
commit on kernel changed ELF_NGREG in elf_gregset_t.
commit 9cf2b72b25f3f6a5a1a46a4f36037e66de52465c
Author: Will Deacon <will.deacon@arm.com>
Date: Tue Jan 22 15:34:40 2013 +0000
arm64: elf: fix core dumping to match what glibc expects
This patch fixes an immediate value in elf64_aarch64_grok_prstatus().
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
bfd/elf64-aarch64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bfd/elf64-aarch64.c b/bfd/elf64-aarch64.c
index 94d90c5..0454a18 100644
--- a/bfd/elf64-aarch64.c
+++ b/bfd/elf64-aarch64.c
@@ -1529,7 +1529,7 @@ elf64_aarch64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
default:
return FALSE;
- case 408: /* sizeof(struct elf_prstatus) on Linux/arm64. */
+ case 392: /* sizeof(struct elf_prstatus) on Linux/arm64. */
/* pr_cursig */
elf_tdata (abfd)->core->signal
= bfd_get_16 (abfd, note->descdata + 12);
--
1.7.9.5