diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-06-10 16:18:12 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-06-10 16:18:12 +0000 |
commit | 8c5580b8c37aeb6b355ef9472e04ea125cb40828 (patch) | |
tree | 23d45072c3617879a5205bab49bdc73198330368 | |
parent | 0e0add3d576468ba43a944c6027dc5a18914cbd4 (diff) | |
download | gdb-8c5580b8c37aeb6b355ef9472e04ea125cb40828.tar.gz |
Revert change for revision.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/ppc-linux-nat.c | 25 |
2 files changed, 11 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a8b150faa99..2a470ca0e5b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -7,10 +7,6 @@ * ppc-linux-tdep.c (ppc64_desc_entry_point): New function. (ppc64_standard_linkage_target): Use it. - * ppc-linux-nat.c (ppc_register_u_addr): Correctly compute u-area - offsets for floating-point registers in both 32- and 64-bit - interfaces. - Merged from trunk: 2003-05-29 Kevin Buettner <kevinb@redhat.com> @@ -53,9 +49,6 @@ argument to ptrace to int; the system headers should give it the right type, and pointers don't fit in ints on powerpc64-*-*. - * ppc-linux-nat.c (ppc_register_u_addr): Compute u-area offsets - using the tdep's wordsize, not just '4'. - * config/powerpc/nm-ppc64-linux.h (PTRACE_XFER_TYPE): This is 'long' on ppc64-*-linux*. diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index feb2f94953a..e1649197e8f 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -127,37 +127,34 @@ ppc_register_u_addr (int regno) { int u_addr = -1; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); - int wordsize = tdep->wordsize; /* General purpose registers occupy 1 slot each in the buffer */ if (regno >= tdep->ppc_gp0_regnum && regno <= tdep->ppc_gplast_regnum ) - u_addr = ((PT_R0 + regno) * wordsize); + u_addr = ((PT_R0 + regno) * 4); - /* Floating point regs: eight bytes in both 32- and 64-bit ptrace - interfaces. Thus, two slots each in 32-bit interface, one slot - each in 64-bit interface. */ + /* Floating point regs: 2 slots each */ if (regno >= FP0_REGNUM && regno <= FPLAST_REGNUM) - u_addr = (PT_FPR0 * wordsize) + ((regno - FP0_REGNUM) * 8); + u_addr = ((PT_FPR0 + (regno - FP0_REGNUM) * 2) * 4); /* UISA special purpose registers: 1 slot each */ if (regno == PC_REGNUM) - u_addr = PT_NIP * wordsize; + u_addr = PT_NIP * 4; if (regno == tdep->ppc_lr_regnum) - u_addr = PT_LNK * wordsize; + u_addr = PT_LNK * 4; if (regno == tdep->ppc_cr_regnum) - u_addr = PT_CCR * wordsize; + u_addr = PT_CCR * 4; if (regno == tdep->ppc_xer_regnum) - u_addr = PT_XER * wordsize; + u_addr = PT_XER * 4; if (regno == tdep->ppc_ctr_regnum) - u_addr = PT_CTR * wordsize; + u_addr = PT_CTR * 4; #ifdef PT_MQ if (regno == tdep->ppc_mq_regnum) - u_addr = PT_MQ * wordsize; + u_addr = PT_MQ * 4; #endif if (regno == tdep->ppc_ps_regnum) - u_addr = PT_MSR * wordsize; + u_addr = PT_MSR * 4; if (regno == tdep->ppc_fpscr_regnum) - u_addr = PT_FPSCR * wordsize; + u_addr = PT_FPSCR * 4; return u_addr; } |