diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2010-07-07 12:28:30 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2010-07-07 12:28:30 +0000 |
commit | 7ff5b2d2dc0f62a83f7bf31d4252f51ebff75c83 (patch) | |
tree | 49fde998578108e55b31f13c613a9b06b07c7f9e /gdb/ppc-linux-tdep.c | |
parent | 943837e71269999db3715f8f6d8260a30388724e (diff) | |
download | gdb-7ff5b2d2dc0f62a83f7bf31d4252f51ebff75c83.tar.gz |
* linux-nat.c (linux_nat_do_thread_registers): Use section size
from gdbarch_core_regset_sections also for .reg if present.
* amd64-linux-tdep.c (amd64_linux_regset_sections): Fix incorrect
section size for .reg.
* ppc-linux-tdep.c (ppc_linux_vsx_regset_sections): Likewise.
(ppc_linux_vmx_regset_sections): Likewise.
(ppc_linux_fp_regset_sections): Likewise.
(ppc64_linux_vsx_regset_sections): New variable.
(ppc64_linux_vmx_regset_sections): Likewise.
(ppc64_linux_fp_regset_sections): Likewise.
(ppc_linux_init_abi): Install core_regset_section lists appropriate
for current word size.
Diffstat (limited to 'gdb/ppc-linux-tdep.c')
-rw-r--r-- | gdb/ppc-linux-tdep.c | 66 |
1 files changed, 53 insertions, 13 deletions
diff --git a/gdb/ppc-linux-tdep.c b/gdb/ppc-linux-tdep.c index 130707f1f7c..8fc85125d63 100644 --- a/gdb/ppc-linux-tdep.c +++ b/gdb/ppc-linux-tdep.c @@ -516,7 +516,7 @@ ppc64_standard_linkage1_target (struct frame_info *frame, static struct core_regset_section ppc_linux_vsx_regset_sections[] = { - { ".reg", 268, "general-purpose" }, + { ".reg", 48 * 4, "general-purpose" }, { ".reg2", 264, "floating-point" }, { ".reg-ppc-vmx", 544, "ppc Altivec" }, { ".reg-ppc-vsx", 256, "POWER7 VSX" }, @@ -525,7 +525,7 @@ static struct core_regset_section ppc_linux_vsx_regset_sections[] = static struct core_regset_section ppc_linux_vmx_regset_sections[] = { - { ".reg", 268, "general-purpose" }, + { ".reg", 48 * 4, "general-purpose" }, { ".reg2", 264, "floating-point" }, { ".reg-ppc-vmx", 544, "ppc Altivec" }, { NULL, 0} @@ -533,7 +533,31 @@ static struct core_regset_section ppc_linux_vmx_regset_sections[] = static struct core_regset_section ppc_linux_fp_regset_sections[] = { - { ".reg", 268, "general-purpose" }, + { ".reg", 48 * 4, "general-purpose" }, + { ".reg2", 264, "floating-point" }, + { NULL, 0} +}; + +static struct core_regset_section ppc64_linux_vsx_regset_sections[] = +{ + { ".reg", 48 * 8, "general-purpose" }, + { ".reg2", 264, "floating-point" }, + { ".reg-ppc-vmx", 544, "ppc Altivec" }, + { ".reg-ppc-vsx", 256, "POWER7 VSX" }, + { NULL, 0} +}; + +static struct core_regset_section ppc64_linux_vmx_regset_sections[] = +{ + { ".reg", 48 * 8, "general-purpose" }, + { ".reg2", 264, "floating-point" }, + { ".reg-ppc-vmx", 544, "ppc Altivec" }, + { NULL, 0} +}; + +static struct core_regset_section ppc64_linux_fp_regset_sections[] = +{ + { ".reg", 48 * 8, "general-purpose" }, { ".reg2", 264, "floating-point" }, { NULL, 0} }; @@ -1507,6 +1531,19 @@ ppc_linux_init_abi (struct gdbarch_info info, set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpcle"); else set_gdbarch_gcore_bfd_target (gdbarch, "elf32-powerpc"); + + /* Supported register 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); } if (tdep->wordsize == 8) @@ -1533,20 +1570,23 @@ ppc_linux_init_abi (struct gdbarch_info info, set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpcle"); else set_gdbarch_gcore_bfd_target (gdbarch, "elf64-powerpc"); + + /* Supported register sections. */ + if (tdesc_find_feature (info.target_desc, + "org.gnu.gdb.power.vsx")) + set_gdbarch_core_regset_sections (gdbarch, + ppc64_linux_vsx_regset_sections); + else if (tdesc_find_feature (info.target_desc, + "org.gnu.gdb.power.altivec")) + set_gdbarch_core_regset_sections (gdbarch, + ppc64_linux_vmx_regset_sections); + else + set_gdbarch_core_regset_sections (gdbarch, + ppc64_linux_fp_regset_sections); } set_gdbarch_regset_from_core_section (gdbarch, ppc_linux_regset_from_core_section); set_gdbarch_core_read_description (gdbarch, ppc_linux_core_read_description); - /* Supported register 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, svr4_fetch_objfile_link_map); |