This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/7] Fixes for aarch64-linux core file support
- From: Omair Javaid <omair dot javaid at linaro dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 28 Aug 2014 18:49:03 +0500
- Subject: Re: [PATCH 2/7] Fixes for aarch64-linux core file support
- Authentication-results: sourceware.org; auth=none
- References: <CANW4E-0xQ0mHfHN1UsXXjL7knxfdot=of8PzBghyVmvZ7xiU-g at mail dot gmail dot com>
Updated after regset rework pushed upstream.
gdb:
2014-08-28 Omair Javaid <omair.javaid@linaro.org>
* aarch64-linux-tdep.c (aarch64_linux_init_abi): Install AArch64
register note sections.
(struct core_regset_section aarch64_linux_regset_sections[]): Declare
AArch64 register note sections.
---
gdb/aarch64-linux-tdep.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index 6377977..e5565a8 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -231,6 +231,15 @@ aarch64_linux_regset_from_core_section (struct gdbarch *gdbarch,
return NULL;
}
+/* Core file register set sections. */
+
+static struct core_regset_section aarch64_linux_regset_sections[] =
+{
+ { ".reg", AARCH64_LINUX_SIZEOF_GREGSET, "general-purpose" },
+ { ".reg2", AARCH64_LINUX_SIZEOF_FPREGSET, "floating-point" },
+ { NULL, 0}
+};
+
/* Implementation of `gdbarch_stap_is_single_operand', as defined in
gdbarch.h. */
@@ -376,6 +385,9 @@ aarch64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
/* Enable longjmp. */
tdep->jb_pc = 11;
+ /* Install supported register note sections. */
+ set_gdbarch_core_regset_sections (gdbarch, aarch64_linux_regset_sections);
+
set_gdbarch_regset_from_core_section (gdbarch,
aarch64_linux_regset_from_core_section);
--
1.9.1