summaryrefslogtreecommitdiff
path: root/gdb/hppa-linux-tdep.c
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2008-09-15 01:56:31 +0000
committerDave Anglin <dave.anglin@nrc.ca>2008-09-15 01:56:31 +0000
commit85c83e9940455e2c6ab318afa35a4a9d11b0a6cf (patch)
tree84e0273924301692b44a61e2c91aa3dcfb94f773 /gdb/hppa-linux-tdep.c
parent76815b175e99f4edaeedf355839875661088fcbe (diff)
downloadbinutils-gdb-85c83e9940455e2c6ab318afa35a4a9d11b0a6cf.tar.gz
* hppa-linux-tdep.c (hppa_dwarf_reg_to_regnum): Remove surrounding
"#if 0" "#endif". Fix mapping of DWARF DBX registers to GDB registers. Correct arguments and improve comments. (hppa_linux_init_abi): Call set_gdbarch_dwarf2_reg_to_regnum. Delete disabled code. * hppa-tdep.c (hppa64_dwarf_reg_to_regnum): Fix check for floating point DBX register, change error to warning, and improve comments.
Diffstat (limited to 'gdb/hppa-linux-tdep.c')
-rw-r--r--gdb/hppa-linux-tdep.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/gdb/hppa-linux-tdep.c b/gdb/hppa-linux-tdep.c
index 2cc591c0f89..2c91441d1fa 100644
--- a/gdb/hppa-linux-tdep.c
+++ b/gdb/hppa-linux-tdep.c
@@ -34,24 +34,21 @@
#include "elf/common.h"
-#if 0
-/* Convert DWARF register number REG to the appropriate register
- number used by GDB. */
+/* Map DWARF DBX register numbers to GDB register numbers. */
static int
-hppa_dwarf_reg_to_regnum (int reg)
+hppa_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
{
- /* registers 0 - 31 are the same in both sets */
- if (reg < 32)
+ /* The general registers and the sar are the same in both sets. */
+ if (reg <= 32)
return reg;
- /* dwarf regs 32 to 85 are fpregs 4 - 31 */
- if (reg >= 32 && reg <= 85)
- return HPPA_FP4_REGNUM + (reg - 32);
+ /* fr4-fr31 (left and right halves) are mapped from 72. */
+ if (reg >= 72 && reg <= 72 + 28 * 2)
+ return HPPA_FP4_REGNUM + (reg - 72);
- warning (_("Unmapped DWARF Register #%d encountered."), reg);
+ warning (_("Unmapped DWARF DBX Register #%d encountered."), reg);
return -1;
}
-#endif
static void
hppa_linux_target_write_pc (struct regcache *regcache, CORE_ADDR v)
@@ -545,12 +542,7 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_regset_from_core_section
(gdbarch, hppa_linux_regset_from_core_section);
-#if 0
- /* Dwarf-2 unwinding support. Not yet working. */
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, hppa_dwarf_reg_to_regnum);
- frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
- frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
-#endif
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,