Commit | Line | Data |
---|---|---|
e8b73ba7 RS |
1 | #include "defs.h" |
2 | #include "gdbcore.h" | |
3 | #include "target.h" | |
4 | #include "monitor.h" | |
5 | ||
6 | void op50n_open(); | |
7 | void general_open(); | |
8 | ||
9 | /* | |
10 | * Define the monitor command strings. Since these are passed directly | |
11 | * through to a printf style function, we need can include formatting | |
12 | * strings. We also need a CR or LF on the end. | |
13 | */ | |
14 | ||
15 | struct target_ops op50n_ops = { | |
16 | "op50n", | |
17 | "Oki's debug monitor for the Op50n Eval board", | |
18 | "Debug on a Oki OP50N eval board.\n\ | |
19 | Specify the serial device it is connected to (e.g. /dev/ttya).", | |
20 | op50n_open, | |
21 | monitor_close, | |
22 | 0, | |
23 | monitor_detach, | |
24 | monitor_resume, | |
25 | monitor_wait, | |
26 | monitor_fetch_register, | |
27 | monitor_store_register, | |
28 | monitor_prepare_to_store, | |
29 | monitor_xfer_inferior_memory, | |
30 | monitor_files_info, | |
31 | monitor_insert_breakpoint, | |
32 | monitor_remove_breakpoint, /* Breakpoints */ | |
33 | 0, | |
34 | 0, | |
35 | 0, | |
36 | 0, | |
37 | 0, /* Terminal handling */ | |
38 | monitor_kill, | |
39 | monitor_load, /* load */ | |
40 | 0, /* lookup_symbol */ | |
41 | monitor_create_inferior, | |
42 | monitor_mourn_inferior, | |
43 | 0, /* can_run */ | |
44 | 0, /* notice_signals */ | |
45 | process_stratum, | |
46 | 0, /* next */ | |
47 | 1, | |
48 | 1, | |
49 | 1, | |
50 | 1, | |
51 | 1, /* all mem, mem, stack, regs, exec */ | |
52 | 0, | |
53 | 0, /* Section pointers */ | |
54 | OPS_MAGIC, /* Always the last thing */ | |
55 | }; | |
56 | ||
57 | struct monitor_ops op50n_cmds = { | |
58 | "\r", /* monitor init string */ | |
59 | "g\r", /* execute or usually GO command */ | |
60 | "g\r", /* continue command */ | |
61 | "t\r", /* single step */ | |
62 | "b %x\r", /* set a breakpoint */ | |
63 | "b %x\r", /* clear a breakpoint */ | |
64 | "s %x %x\r", /* set memory to a value */ | |
65 | "s %x\r", /* display memory */ | |
66 | "", /* prompt memory commands use */ | |
67 | "x %s %x\r", /* set a register */ | |
68 | "", /* delimiter between registers */ | |
69 | "x %s\r", /* read a register */ | |
70 | "r\r", /* download command */ | |
71 | "#", /* monitor command prompt */ | |
72 | "", /* end-of-command delimitor */ | |
73 | ".", /* optional command terminator */ | |
74 | &op50n_ops /* target operations */ | |
75 | }; | |
76 | ||
77 | void | |
78 | op50n_open(args, from_tty) | |
79 | char *args; | |
80 | int from_tty; | |
81 | { | |
82 | push_target(&op50n_ops); | |
83 | push_monitor (&op50n_cmds); | |
84 | general_open (args, "op50n", from_tty); | |
85 | } | |
86 | ||
87 | void | |
88 | _initialize_op50n () | |
89 | { | |
90 | add_target (&op50n_ops); | |
91 | } |