aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2008-08-26 15:16:41 +0000
committerLuis Machado <luisgpm@br.ibm.com>2008-08-26 15:16:41 +0000
commit6207416c57d54d90d08372f98eda124650a9bbc2 (patch)
tree3511e42cc65f88c649ea449489c0d6134e10375d /gdb
parentfcef9eb7bc1d1620fa9835bb10ffe8a3b8e8280a (diff)
downloadgdb-6207416c57d54d90d08372f98eda124650a9bbc2.zip
gdb-6207416c57d54d90d08372f98eda124650a9bbc2.tar.gz
gdb-6207416c57d54d90d08372f98eda124650a9bbc2.tar.bz2
* ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
(ppc_linux_vmx_regset_sections): New structure. (ppc_linux_fp_regset_sections): New structure. (ppc_linux_init_abi): Select core-file regset based on target features.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/ppc-linux-tdep.c26
2 files changed, 32 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 15d3499..d9745da 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-26 Luis Machado <luisgpm@br.ibm.com>
+
+ * ppc-linux-tdep.c (ppc_linux_vsx_regset_sections) New structure.
+ (ppc_linux_vmx_regset_sections): New structure.
+ (ppc_linux_fp_regset_sections): New structure.
+ (ppc_linux_init_abi): Select core-file regset based on target
+ features.
+
2008-08-26 Ulrich Weigand <uweigand@de.ibm.com>
* target.c (debug_print_register): Use regcache_raw_collect
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index c3c0c1b..2804857 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -491,7 +491,7 @@ ppc64_standard_linkage1_target (struct frame_info *frame,
return ppc64_desc_entry_point (desc);
}
-static struct core_regset_section ppc_linux_regset_sections[] =
+static struct core_regset_section ppc_linux_vsx_regset_sections[] =
{
{ ".reg", 268 },
{ ".reg2", 264 },
@@ -500,6 +500,21 @@ static struct core_regset_section ppc_linux_regset_sections[] =
{ NULL, 0}
};
+static struct core_regset_section ppc_linux_vmx_regset_sections[] =
+{
+ { ".reg", 268 },
+ { ".reg2", 264 },
+ { ".reg-ppc-vmx", 544 },
+ { NULL, 0}
+};
+
+static struct core_regset_section ppc_linux_fp_regset_sections[] =
+{
+ { ".reg", 268 },
+ { ".reg2", 264 },
+ { NULL, 0}
+};
+
static CORE_ADDR
ppc64_standard_linkage2_target (struct frame_info *frame,
CORE_ADDR pc, unsigned int *insn)
@@ -1103,7 +1118,14 @@ ppc_linux_init_abi (struct gdbarch_info info,
set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description);
/* Supported register sections. */
- set_gdbarch_core_regset_sections (gdbarch, ppc_linux_regset_sections);
+ if (tdesc_find_feature (info.target_desc,
+ "org.gnu.gdb.power.vsx"))
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_vsx_regset_sections);
+ else if (tdesc_find_feature (info.target_desc,
+ "org.gnu.gdb.power.altivec"))
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_vmx_regset_sections);
+ else
+ set_gdbarch_core_regset_sections (gdbarch, ppc_linux_fp_regset_sections);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,