aboutsummaryrefslogtreecommitdiff
path: root/gdb/ppc-linux-tdep.c
diff options
context:
space:
mode:
authorCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>2007-10-29 20:26:42 +0000
committerCarlos Eduardo Seo <cseo@linux.vnet.ibm.com>2007-10-29 20:26:42 +0000
commit06caf7d297df7c596ca98678c1569e031f7c893e (patch)
tree0243affea7391be743c5fed9d236691a01235476 /gdb/ppc-linux-tdep.c
parent566221476275c4fdb5c0a32fbda95a7ce1f05f3b (diff)
downloadgdb-06caf7d297df7c596ca98678c1569e031f7c893e.zip
gdb-06caf7d297df7c596ca98678c1569e031f7c893e.tar.gz
gdb-06caf7d297df7c596ca98678c1569e031f7c893e.tar.bz2
* ppc-linux-tdep.c (ppc32_linux_reg_offsets): Corrected
swapped offsets and VRSAVE offset. (ppc64_linux_reg_offsets): Corrected swapped offsets. (ppc32_linux_vrregset): Added. (ppc_linux_regset_from_core_section): Added support for .reg-ppc-vmx section. * ppc-tdep.h (ppc_altivec_support_p): Declare. (ppc_supply_vrregset): Declare. (ppc_collect_vrregset): Declare. * rs6000-tdep.c (ppc_altivec_support_p): Added. (ppc_supply_vrregset): Added. (ppc_collect_vrregset): Added. * corelow.c (get_core_registers): Added support for .reg-ppc-vmx section.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r--gdb/ppc-linux-tdep.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c
index 324cef7..323078e 100644
--- a/gdb/ppc-linux-tdep.c
+++ b/gdb/ppc-linux-tdep.c
@@ -650,8 +650,8 @@ static const struct ppc_reg_offsets ppc32_linux_reg_offsets =
/* AltiVec registers. */
/* .vr0_offset = */ 0,
- /* .vrsave_offset = */ 512,
- /* .vscr_offset = */ 512 + 12
+ /* .vscr_offset = */ 512 + 12,
+ /* .vrsave_offset = */ 528
};
static const struct ppc_reg_offsets ppc64_linux_reg_offsets =
@@ -675,8 +675,8 @@ static const struct ppc_reg_offsets ppc64_linux_reg_offsets =
/* AltiVec registers. */
/* .vr0_offset = */ 0,
- /* .vrsave_offset = */ 528,
- /* .vscr_offset = */ 512 + 12
+ /* .vscr_offset = */ 512 + 12,
+ /* .vrsave_offset = */ 528
};
static const struct regset ppc32_linux_gregset = {
@@ -700,6 +700,13 @@ static const struct regset ppc32_linux_fpregset = {
NULL
};
+static const struct regset ppc32_linux_vrregset = {
+ &ppc32_linux_reg_offsets,
+ ppc_supply_vrregset,
+ ppc_collect_vrregset,
+ NULL
+};
+
const struct regset *
ppc_linux_gregset (int wordsize)
{
@@ -726,6 +733,8 @@ ppc_linux_regset_from_core_section (struct gdbarch *core_arch,
}
if (strcmp (sect_name, ".reg2") == 0)
return &ppc32_linux_fpregset;
+ if (strcmp (sect_name, ".reg-ppc-vmx") == 0)
+ return &ppc32_linux_vrregset;
return NULL;
}