/* registers numbers shared with the simulator */
#include "gdb/sim-sh.h"
-static void (*sh_show_regs) (void);
+static void (*sh_show_regs) (struct frame_info *);
#define SH_NUM_REGS 67
/* Print the registers in a form similar to the E7000 */
static void
-sh_generic_show_regs (void)
+sh_generic_show_regs (struct frame_info *frame)
{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
}
static void
-sh3_show_regs (void)
+sh3_show_regs (struct frame_info *frame)
{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (" SSR %08lx SPC %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM));
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
}
-
static void
-sh2e_show_regs (void)
-{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
+sh2e_show_regs (struct frame_info *frame)
+{
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
-
- printf_filtered ("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered ("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
+
+ printf_filtered
+ ("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 7));
+ printf_filtered
+ ("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 14),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 15));
}
static void
-sh2a_show_regs (void)
-{
- int pr = read_register (FPSCR_REGNUM) & 0x80000;
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx TBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (TBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
-
- printf_filtered ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
-
- printf_filtered (
- (pr ? "DR0-DR6 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered (
- (pr ? "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
- printf_filtered ("BANK=%-3d\n", (int) read_register (BANK_REGNUM));
- printf_filtered (
- "R0b-R7b %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 0),
- (long) read_register (R0_BANK0_REGNUM + 1),
- (long) read_register (R0_BANK0_REGNUM + 2),
- (long) read_register (R0_BANK0_REGNUM + 3),
- (long) read_register (R0_BANK0_REGNUM + 4),
- (long) read_register (R0_BANK0_REGNUM + 5),
- (long) read_register (R0_BANK0_REGNUM + 6),
- (long) read_register (R0_BANK0_REGNUM + 7));
- printf_filtered ("R8b-R14b %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 8),
- (long) read_register (R0_BANK0_REGNUM + 9),
- (long) read_register (R0_BANK0_REGNUM + 10),
- (long) read_register (R0_BANK0_REGNUM + 11),
- (long) read_register (R0_BANK0_REGNUM + 12),
- (long) read_register (R0_BANK0_REGNUM + 13),
- (long) read_register (R0_BANK0_REGNUM + 14));
- printf_filtered ("MACHb=%08lx IVNb=%08lx PRb=%08lx GBRb=%08lx MACLb=%08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 15),
- (long) read_register (R0_BANK0_REGNUM + 16),
- (long) read_register (R0_BANK0_REGNUM + 17),
- (long) read_register (R0_BANK0_REGNUM + 18),
- (long) read_register (R0_BANK0_REGNUM + 19));
+sh2a_show_regs (struct frame_info *frame)
+{
+ int pr = get_frame_register_unsigned (frame, FPSCR_REGNUM) & 0x80000;
+
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx TBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, TBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
+
+ printf_filtered
+ ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
+
+ printf_filtered
+ (pr ? "DR0-DR6 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
+ : "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 7));
+ printf_filtered
+ (pr ? "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
+ : "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 14),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 15));
+ printf_filtered
+ ("BANK=%-3d\n", (int) get_frame_register_unsigned (frame, BANK_REGNUM));
+ printf_filtered
+ ("R0b-R7b %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 7));
+ printf_filtered
+ ("R8b-R14b %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 14));
+ printf_filtered
+ ("MACHb=%08lx IVNb=%08lx PRb=%08lx GBRb=%08lx MACLb=%08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 15),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 16),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 17),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 18),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 19));
}
static void
-sh2a_nofpu_show_regs (void)
-{
- int pr = read_register (FPSCR_REGNUM) & 0x80000;
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx TBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (TBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
-
- printf_filtered ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
-
- printf_filtered ("BANK=%-3d\n", (int) read_register (BANK_REGNUM));
- printf_filtered (
- "R0b-R7b %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 0),
- (long) read_register (R0_BANK0_REGNUM + 1),
- (long) read_register (R0_BANK0_REGNUM + 2),
- (long) read_register (R0_BANK0_REGNUM + 3),
- (long) read_register (R0_BANK0_REGNUM + 4),
- (long) read_register (R0_BANK0_REGNUM + 5),
- (long) read_register (R0_BANK0_REGNUM + 6),
- (long) read_register (R0_BANK0_REGNUM + 7));
- printf_filtered ("R8b-R14b %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 8),
- (long) read_register (R0_BANK0_REGNUM + 9),
- (long) read_register (R0_BANK0_REGNUM + 10),
- (long) read_register (R0_BANK0_REGNUM + 11),
- (long) read_register (R0_BANK0_REGNUM + 12),
- (long) read_register (R0_BANK0_REGNUM + 13),
- (long) read_register (R0_BANK0_REGNUM + 14));
- printf_filtered ("MACHb=%08lx IVNb=%08lx PRb=%08lx GBRb=%08lx MACLb=%08lx\n",
- (long) read_register (R0_BANK0_REGNUM + 15),
- (long) read_register (R0_BANK0_REGNUM + 16),
- (long) read_register (R0_BANK0_REGNUM + 17),
- (long) read_register (R0_BANK0_REGNUM + 18),
- (long) read_register (R0_BANK0_REGNUM + 19));
+sh2a_nofpu_show_regs (struct frame_info *frame)
+{
+ int pr = get_frame_register_unsigned (frame, FPSCR_REGNUM) & 0x80000;
+
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx TBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, TBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
+
+ printf_filtered
+ ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
+
+ printf_filtered
+ ("BANK=%-3d\n", (int) get_frame_register_unsigned (frame, BANK_REGNUM));
+ printf_filtered
+ ("R0b-R7b %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 7));
+ printf_filtered
+ ("R8b-R14b %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 14));
+ printf_filtered
+ ("MACHb=%08lx IVNb=%08lx PRb=%08lx GBRb=%08lx MACLb=%08lx\n",
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 15),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 16),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 17),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 18),
+ (long) get_frame_register_unsigned (frame, R0_BANK0_REGNUM + 19));
}
static void
-sh3e_show_regs (void)
-{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
+sh3e_show_regs (struct frame_info *frame)
+{
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
-
- printf_filtered ("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered ("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
+
+ printf_filtered
+ ("FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 7));
+ printf_filtered
+ ("FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 14),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 15));
}
static void
-sh3_dsp_show_regs (void)
+sh3_dsp_show_regs (struct frame_info *frame)
{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
- printf_filtered (" SSR %08lx SPC %08lx DSR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (DSR_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx DSR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, DSR_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
printf_filtered
("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
- (long) read_register (A0G_REGNUM) & 0xff,
- (long) read_register (A0_REGNUM), (long) read_register (M0_REGNUM),
- (long) read_register (X0_REGNUM), (long) read_register (Y0_REGNUM),
- (long) read_register (RS_REGNUM), (long) read_register (MOD_REGNUM));
- printf_filtered ("A1G=%02lx A1=%08lx M1=%08lx X1=%08lx Y1=%08lx RE=%08lx\n",
- (long) read_register (A1G_REGNUM) & 0xff,
- (long) read_register (A1_REGNUM),
- (long) read_register (M1_REGNUM),
- (long) read_register (X1_REGNUM),
- (long) read_register (Y1_REGNUM),
- (long) read_register (RE_REGNUM));
+ (long) get_frame_register_unsigned (frame, A0G_REGNUM) & 0xff,
+ (long) get_frame_register_unsigned (frame, A0_REGNUM),
+ (long) get_frame_register_unsigned (frame, M0_REGNUM),
+ (long) get_frame_register_unsigned (frame, X0_REGNUM),
+ (long) get_frame_register_unsigned (frame, Y0_REGNUM),
+ (long) get_frame_register_unsigned (frame, RS_REGNUM),
+ (long) get_frame_register_unsigned (frame, MOD_REGNUM));
+ printf_filtered
+ ("A1G=%02lx A1=%08lx M1=%08lx X1=%08lx Y1=%08lx RE=%08lx\n",
+ (long) get_frame_register_unsigned (frame, A1G_REGNUM) & 0xff,
+ (long) get_frame_register_unsigned (frame, A1_REGNUM),
+ (long) get_frame_register_unsigned (frame, M1_REGNUM),
+ (long) get_frame_register_unsigned (frame, X1_REGNUM),
+ (long) get_frame_register_unsigned (frame, Y1_REGNUM),
+ (long) get_frame_register_unsigned (frame, RE_REGNUM));
}
static void
-sh4_show_regs (void)
-{
- int pr = read_register (FPSCR_REGNUM) & 0x80000;
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
-
- printf_filtered ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
-
- printf_filtered (
- (pr ? "DR0-DR6 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 0),
- (long) read_register (FP0_REGNUM + 1),
- (long) read_register (FP0_REGNUM + 2),
- (long) read_register (FP0_REGNUM + 3),
- (long) read_register (FP0_REGNUM + 4),
- (long) read_register (FP0_REGNUM + 5),
- (long) read_register (FP0_REGNUM + 6),
- (long) read_register (FP0_REGNUM + 7));
- printf_filtered (
- (pr ? "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
- : "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n"),
- (long) read_register (FP0_REGNUM + 8),
- (long) read_register (FP0_REGNUM + 9),
- (long) read_register (FP0_REGNUM + 10),
- (long) read_register (FP0_REGNUM + 11),
- (long) read_register (FP0_REGNUM + 12),
- (long) read_register (FP0_REGNUM + 13),
- (long) read_register (FP0_REGNUM + 14),
- (long) read_register (FP0_REGNUM + 15));
+sh4_show_regs (struct frame_info *frame)
+{
+ int pr = get_frame_register_unsigned (frame, FPSCR_REGNUM) & 0x80000;
+
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
+
+ printf_filtered
+ ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
+
+ printf_filtered
+ (pr ? "DR0-DR6 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
+ : "FP0-FP7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 0),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 1),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 2),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 3),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 4),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 5),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 6),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 7));
+ printf_filtered
+ (pr ? "DR8-DR14 %08lx%08lx %08lx%08lx %08lx%08lx %08lx%08lx\n"
+ : "FP8-FP15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 8),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 9),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 10),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 11),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 12),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 13),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 14),
+ (long) get_frame_register_unsigned (frame, FP0_REGNUM + 15));
}
static void
-sh4_nofpu_show_regs (void)
-{
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (MACL_REGNUM));
- printf_filtered (
- " SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
- (long) read_register (SSR_REGNUM),
- (long) read_register (SPC_REGNUM),
- (long) read_register (FPUL_REGNUM),
- (long) read_register (FPSCR_REGNUM));
-
- printf_filtered ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
+sh4_nofpu_show_regs (struct frame_info *frame)
+{
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
+
+ printf_filtered
+ (" GBR %08lx VBR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
+ printf_filtered
+ (" SSR %08lx SPC %08lx FPUL %08lx FPSCR %08lx\n",
+ (long) get_frame_register_unsigned (frame, SSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, SPC_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPUL_REGNUM),
+ (long) get_frame_register_unsigned (frame, FPSCR_REGNUM));
+
+ printf_filtered
+ ("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
}
static void
-sh_dsp_show_regs (void)
+sh_dsp_show_regs (struct frame_info *frame)
{
+ printf_filtered
+ (" PC %s SR %08lx PR %08lx MACH %08lx\n",
+ paddr (get_frame_register_unsigned (frame, PC_REGNUM)),
+ (long) get_frame_register_unsigned (frame, SR_REGNUM),
+ (long) get_frame_register_unsigned (frame, PR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACH_REGNUM));
- printf_filtered (" PC %s SR %08lx PR %08lx MACH %08lx\n",
- paddr (read_register (PC_REGNUM)),
- (long) read_register (SR_REGNUM),
- (long) read_register (PR_REGNUM),
- (long) read_register (MACH_REGNUM));
-
- printf_filtered (
- " GBR %08lx VBR %08lx DSR %08lx MACL %08lx\n",
- (long) read_register (GBR_REGNUM),
- (long) read_register (VBR_REGNUM),
- (long) read_register (DSR_REGNUM),
- (long) read_register (MACL_REGNUM));
+ printf_filtered
+ (" GBR %08lx VBR %08lx DSR %08lx MACL %08lx\n",
+ (long) get_frame_register_unsigned (frame, GBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, VBR_REGNUM),
+ (long) get_frame_register_unsigned (frame, DSR_REGNUM),
+ (long) get_frame_register_unsigned (frame, MACL_REGNUM));
printf_filtered
("R0-R7 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (0), (long) read_register (1),
- (long) read_register (2), (long) read_register (3),
- (long) read_register (4), (long) read_register (5),
- (long) read_register (6), (long) read_register (7));
- printf_filtered ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
- (long) read_register (8), (long) read_register (9),
- (long) read_register (10), (long) read_register (11),
- (long) read_register (12), (long) read_register (13),
- (long) read_register (14), (long) read_register (15));
+ (long) get_frame_register_unsigned (frame, 0),
+ (long) get_frame_register_unsigned (frame, 1),
+ (long) get_frame_register_unsigned (frame, 2),
+ (long) get_frame_register_unsigned (frame, 3),
+ (long) get_frame_register_unsigned (frame, 4),
+ (long) get_frame_register_unsigned (frame, 5),
+ (long) get_frame_register_unsigned (frame, 6),
+ (long) get_frame_register_unsigned (frame, 7));
+ printf_filtered
+ ("R8-R15 %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ (long) get_frame_register_unsigned (frame, 8),
+ (long) get_frame_register_unsigned (frame, 9),
+ (long) get_frame_register_unsigned (frame, 10),
+ (long) get_frame_register_unsigned (frame, 11),
+ (long) get_frame_register_unsigned (frame, 12),
+ (long) get_frame_register_unsigned (frame, 13),
+ (long) get_frame_register_unsigned (frame, 14),
+ (long) get_frame_register_unsigned (frame, 15));
printf_filtered
("A0G=%02lx A0=%08lx M0=%08lx X0=%08lx Y0=%08lx RS=%08lx MOD=%08lx\n",
- (long) read_register (A0G_REGNUM) & 0xff,
- (long) read_register (A0_REGNUM), (long) read_register (M0_REGNUM),
- (long) read_register (X0_REGNUM), (long) read_register (Y0_REGNUM),
- (long) read_register (RS_REGNUM), (long) read_register (MOD_REGNUM));
+ (long) get_frame_register_unsigned (frame, A0G_REGNUM) & 0xff,
+ (long) get_frame_register_unsigned (frame, A0_REGNUM),
+ (long) get_frame_register_unsigned (frame, M0_REGNUM),
+ (long) get_frame_register_unsigned (frame, X0_REGNUM),
+ (long) get_frame_register_unsigned (frame, Y0_REGNUM),
+ (long) get_frame_register_unsigned (frame, RS_REGNUM),
+ (long) get_frame_register_unsigned (frame, MOD_REGNUM));
printf_filtered ("A1G=%02lx A1=%08lx M1=%08lx X1=%08lx Y1=%08lx RE=%08lx\n",
- (long) read_register (A1G_REGNUM) & 0xff,
- (long) read_register (A1_REGNUM),
- (long) read_register (M1_REGNUM),
- (long) read_register (X1_REGNUM),
- (long) read_register (Y1_REGNUM),
- (long) read_register (RE_REGNUM));
+ (long) get_frame_register_unsigned (frame, A1G_REGNUM) & 0xff,
+ (long) get_frame_register_unsigned (frame, A1_REGNUM),
+ (long) get_frame_register_unsigned (frame, M1_REGNUM),
+ (long) get_frame_register_unsigned (frame, X1_REGNUM),
+ (long) get_frame_register_unsigned (frame, Y1_REGNUM),
+ (long) get_frame_register_unsigned (frame, RE_REGNUM));
}
static void
sh_show_regs_command (char *args, int from_tty)
{
if (sh_show_regs)
- (*sh_show_regs) ();
+ (*sh_show_regs) (get_current_frame ());
}
static struct type *