diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-11-26 16:42:11 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2001-11-26 16:42:11 +0000 |
commit | 7d69eeecda86a4e30c825975c457cc6ffdc396cc (patch) | |
tree | 13233beae9d8a5acc3e241ea182961099bf8579c /gdb | |
parent | 870fdb32807de2c7ccfbddc44756fb8b44f3b6d1 (diff) | |
download | fsf-binutils-gdb-7d69eeecda86a4e30c825975c457cc6ffdc396cc.zip fsf-binutils-gdb-7d69eeecda86a4e30c825975c457cc6ffdc396cc.tar.gz fsf-binutils-gdb-7d69eeecda86a4e30c825975c457cc6ffdc396cc.tar.bz2 |
* sparc-nat.c (fetch_inferior_registers): Don't rely
on CORE_ADDR being 32-bit.
(store_inferior_registers): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/sparc-nat.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 769e554..5828b50 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-11-26 Jakub Jelinek <jakub@redhat.com> + + * sparc-nat.c (fetch_inferior_registers): Don't rely + on CORE_ADDR being 32-bit. + (store_inferior_registers): Likewise. + 2001-11-25 Eli Zaretskii <eliz@is.elta.co.il> * config/djgpp/config.sed: Fix an error in etc/ at "make install" diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c index bb75e1f..f628b0e 100644 --- a/gdb/sparc-nat.c +++ b/gdb/sparc-nat.c @@ -120,15 +120,15 @@ fetch_inferior_registers (int regno) all (16 ptrace calls!) if we really need them. */ if (regno == -1) { - target_read_memory (*(CORE_ADDR *) & registers[REGISTER_BYTE (SP_REGNUM)], - ®isters[REGISTER_BYTE (L0_REGNUM)], + CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)]; + target_read_memory (sp, ®isters[REGISTER_BYTE (L0_REGNUM)], 16 * REGISTER_RAW_SIZE (L0_REGNUM)); for (i = L0_REGNUM; i <= I7_REGNUM; i++) register_valid[i] = 1; } else if (regno >= L0_REGNUM && regno <= I7_REGNUM) { - CORE_ADDR sp = *(CORE_ADDR *) & registers[REGISTER_BYTE (SP_REGNUM)]; + CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)]; i = REGISTER_BYTE (regno); if (register_valid[regno]) printf_unfiltered ("register %d valid and read\n", regno); @@ -190,7 +190,7 @@ store_inferior_registers (int regno) if (wanna_store & STACK_REGS) { - CORE_ADDR sp = *(CORE_ADDR *) & registers[REGISTER_BYTE (SP_REGNUM)]; + CORE_ADDR sp = *(unsigned int *) & registers[REGISTER_BYTE (SP_REGNUM)]; if (regno < 0 || regno == SP_REGNUM) { |