2 * op50n-rom.c -- configure GDB for an Oki op59n eval board.
13 * this array of registers need to match the indexes used by GDB. The
14 * whole reason this exists is cause the various ROM monitors use
15 * different strings than GDB does, and doesn't support all the
16 * registers either. So, typing "info reg sp" becomes a "r30".
18 static char *op50n_regnames
[] = {
19 "r0_zero", "r1_tO ", "r2_rp ", "r3_s15 ", "r4_s14 ", "r5_s13 ", "r6_s12 ",
20 "r7_s11 ", "r8_s10 ", "r9_s9 ", "r10_s8 ", "r11_s7 ", "r12_s6 ", "r13_s5 ",
21 "r14_s4 ", "r15_s3 ", "r16_s2 ", "r17_s1 ", "r18_s0 ", "r19_t4 ", "r20_t3 ",
22 "r21_t2 ", "r22_t1 ", "r23_a3 ", "r24_a2 ", "r25_a1 ", "r26_a0 ", "r27_dp ",
23 "r28_v0 ", "r29_v1 ", "r30_sp ", "r31_t5 ", "", "p", "",
24 "", "", "", "", "", "", "",
25 "", "", "", "", "", "", "",
26 "", "", "", "", "", "", "", "",
27 "", "", "", "", "", "", "",
28 "", "", "", "", "", "", "", "",
29 "", "", "", "", "", "", "", "",
30 "", "", "", "", "", "", "", "",
31 "", "", "", "", "", "", "", "",
32 "", "", "", "", "", "", "", "",
33 "", "", "", "", "", "", "", "",
34 "", "", "", "", "", "", "", "",
35 "", "", "", "", "", "", "", ""
39 * Define the monitor command strings. Since these are passed directly
40 * through to a printf style function, we need can include formatting
41 * strings. We also need a CR or LF on the end.
44 struct target_ops op50n_ops
= {
46 "Oki's debug monitor for the Op50n Eval board",
48 "Debug on a Oki OP50N eval board.\n\
49 Specify the serial device it is connected to (e.g. /dev/ttya).",
57 monitor_fetch_register
,
58 monitor_store_register
,
59 monitor_prepare_to_store
,
60 monitor_xfer_inferior_memory
,
62 monitor_insert_breakpoint
,
63 monitor_remove_breakpoint
, /* Breakpoints */
68 0, /* Terminal handling */
70 monitor_load
, /* load */
71 0, /* lookup_symbol */
72 monitor_create_inferior
,
73 monitor_mourn_inferior
,
75 0, /* notice_signals */
82 1, /* all mem, mem, stack, regs, exec */
84 0, /* Section pointers */
85 OPS_MAGIC
, /* Always the last thing */
88 struct monitor_ops op50n_cmds
= {
89 1, /* 1 for ASCII, 0 for binary */
90 ".\nXx\n", /* monitor init string */
91 "g %x", /* execute or usually GO command */
92 "g.", /* continue command */
93 "c\n", /* single step */
94 "b %x\n", /* set a breakpoint */
95 "bx %x\n", /* clear a breakpoint */
96 0, /* 0 for number, 1 for address */
98 "sx %x %x;.\n", /* set memory */
103 "sx %x\n", /* get memory */
104 ": ", /* delimiter */
105 " ", /* the result */
108 "x %s\n", /* set a register */
109 "=", /* delimiter between registers */
113 "x %s\n", /* get a register */
114 "=", /* delimiter between registers */
117 "r 0\n", /* download command */
118 "#", /* monitor command prompt */
119 " ", /* end-of-command delimitor */
120 ".\n", /* optional command terminator */
121 &op50n_ops
, /* target operations */
122 "srec,binary", /* load types */
127 op50n_open(args
, from_tty
)
131 target_preopen(from_tty
);
132 push_target(&op50n_ops
);
133 push_monitor (&op50n_cmds
);
134 monitor_open (args
, "op50n", from_tty
);
140 add_target (&op50n_ops
);
142 /* this is the default, since it's that's how the board comes up after
143 power cycle. It can then be changed using set remotebaud