aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandolph Chung <tausq@debian.org>2004-12-06 03:36:38 +0000
committerRandolph Chung <tausq@debian.org>2004-12-06 03:36:38 +0000
commitc1299d67f5e87927ba19ac99524d238905b9c406 (patch)
treeb83f4efe504faf33cc151cfca4015067130cbebc
parent57dac9e17d264382a22aab869e628baeae201338 (diff)
downloadgdb-c1299d67f5e87927ba19ac99524d238905b9c406.zip
gdb-c1299d67f5e87927ba19ac99524d238905b9c406.tar.gz
gdb-c1299d67f5e87927ba19ac99524d238905b9c406.tar.bz2
2004-12-05 Randolph Chung <tausq@debian.org>
* hppah-nat.c (store_inferior_registers): Rewrite logic to not use DEPRECATED_REGISTER_BYTE.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/hppah-nat.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4496c6f..2325987 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2004-12-05 Randolph Chung <tausq@debian.org>
+ * hppah-nat.c (store_inferior_registers): Rewrite logic to not use
+ DEPRECATED_REGISTER_BYTE.
+
+2004-12-05 Randolph Chung <tausq@debian.org>
+
* hppa-tdep.c (unwind_command): Print the stub type for stub unwind
records.
diff --git a/gdb/hppah-nat.c b/gdb/hppah-nat.c
index 2a79b61..bf6af6d 100644
--- a/gdb/hppah-nat.c
+++ b/gdb/hppah-nat.c
@@ -114,8 +114,9 @@ store_inferior_registers (int regno)
/* Floating-point registers come from the ss_fpblock area. */
else if (regno >= HPPA_FP0_REGNUM)
- addr = (HPPAH_OFFSETOF (save_state_t, ss_fpblock)
- + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (HPPA_FP0_REGNUM)));
+ addr = HPPAH_OFFSETOF (save_state_t, ss_fpblock)
+ + ((regno - HPPA_FP0_REGNUM)
+ * register_size (current_gdbarch, regno));
/* Wide registers come from the ss_wide area.
I think it's more PC to test (ss_flags & SS_WIDEREGS) to select
@@ -123,14 +124,14 @@ store_inferior_registers (int regno)
But checking ss_flags would require an extra ptrace call for
every register reference. Bleah. */
else if (len == 8)
- addr = (HPPAH_OFFSETOF (save_state_t, ss_wide)
- + DEPRECATED_REGISTER_BYTE (regno));
+ addr = HPPAH_OFFSETOF (save_state_t, ss_wide)
+ + regno * 8;
/* Narrow registers come from the ss_narrow area. Note that
ss_narrow starts with gr1, not gr0. */
else if (len == 4)
- addr = (HPPAH_OFFSETOF (save_state_t, ss_narrow)
- + (DEPRECATED_REGISTER_BYTE (regno) - DEPRECATED_REGISTER_BYTE (1)));
+ addr = HPPAH_OFFSETOF (save_state_t, ss_narrow)
+ + (regno - 1) * 4;
else
internal_error (__FILE__, __LINE__,
"hppah-nat.c (write_register): unexpected register size");