This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] info float for SH
- From: Michael Snyder <msnyder at redhat dot com>
- To: gdb-patches at sources dot redhat dot com, Elena Zannoni <ezannoni at redhat dot com>
- Date: Tue, 29 Jul 2003 15:23:03 -0700
- Subject: [RFA] info float for SH
Elena,
This change is needed because the double registers are all even numbered:
dr0, dr2, dr4... rather than dr0, dr1, dr2...
Michael
2003-07-29 Michael Snyder <msnyder@redhat.com>
* sh-tdep.c (do_dr_register_info): Double regs are all even-numbered.
Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.134
diff -p -r1.134 sh-tdep.c
*** sh-tdep.c 16 Jul 2003 09:45:56 -0000 1.134
--- sh-tdep.c 29 Jul 2003 22:19:53 -0000
*************** do_dr_register_info (struct gdbarch *gdb
*** 3877,3884 ****
{
int first_fp_reg_num = dr_reg_base_num (dr_regnum);
! fprintf_filtered (file, "dr%d\t0x%08x%08x\n",
! dr_regnum - gdbarch_tdep (gdbarch)->DR0_REGNUM,
(int) read_register (first_fp_reg_num),
(int) read_register (first_fp_reg_num + 1));
}
--- 3877,3884 ----
{
int first_fp_reg_num = dr_reg_base_num (dr_regnum);
! fprintf_filtered (file, "dr%d\t0x%08x%08x\n",
! (dr_regnum - gdbarch_tdep (gdbarch)->DR0_REGNUM) * 2,
(int) read_register (first_fp_reg_num),
(int) read_register (first_fp_reg_num + 1));
}