diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2008-09-15 01:56:31 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2008-09-15 01:56:31 +0000 |
commit | 85c83e9940455e2c6ab318afa35a4a9d11b0a6cf (patch) | |
tree | 84e0273924301692b44a61e2c91aa3dcfb94f773 /gdb/hppa-tdep.c | |
parent | 76815b175e99f4edaeedf355839875661088fcbe (diff) | |
download | gdb-85c83e9940455e2c6ab318afa35a4a9d11b0a6cf.zip gdb-85c83e9940455e2c6ab318afa35a4a9d11b0a6cf.tar.gz gdb-85c83e9940455e2c6ab318afa35a4a9d11b0a6cf.tar.bz2 |
* 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-tdep.c')
-rw-r--r-- | gdb/hppa-tdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index cd844e82..5b6676e 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -658,18 +658,19 @@ hppa64_register_name (struct gdbarch *gdbarch, int i) return names[i]; } +/* Map dwarf DBX register numbers to GDB register numbers. */ static int hppa64_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg) { - /* r0-r31 and sar map one-to-one. */ + /* The general registers and the sar are the same in both sets. */ if (reg <= 32) return reg; /* fr4-fr31 are mapped from 72 in steps of 2. */ - if (reg >= 72 || reg < 72 + 28 * 2) + if (reg >= 72 && reg < 72 + 28 * 2 && !(reg & 1)) return HPPA64_FP4_REGNUM + (reg - 72) / 2; - error ("Invalid DWARF register num %d.", reg); + warning (_("Unmapped DWARF DBX Register #%d encountered."), reg); return -1; } |