Mon Apr 27 13:46:40 1998 John Metzler <jmetzler@cygnus.com>
* rom68k-rom.c (_initialize_rom68k init_rom68k_cmds): * abug-rom.c (_initialize_abug_rom init_abug-cmds): * cpu32bug-rom.c (_initialize_cpu32bug_rom init_cpu32bug_cmds): * mon960-rom.c (initialize_mon960 init_mon960_cmds): * op50-rom.c (initialize_op50n init_op50n_cmds) : * ppcbug-rom.c (_initialize_ppcbug_rom init_ppc_cmds) : * sh3-rom.c (_initialize_sh3_rom init_sh3_cmds) : * sparclet-rom.c (_initialize_sparcletinit_sparclet_cmds ) : * remote-est.c ( _initialize_est init_est_cmds) : * remote-hms.c ( _initialize_remote_hms init_hms_cmds) : Convert all static initializations of monitor ops structures to executable initializations in oreer tat additions to the data structure definition can me made without repeating this editing exercise
This commit is contained in:
parent
cc4f98f55e
commit
adc176bb64
11 changed files with 528 additions and 575 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
Mon Apr 27 13:46:40 1998 John Metzler <jmetzler@cygnus.com>
|
||||||
|
|
||||||
|
* rom68k-rom.c (_initialize_rom68k init_rom68k_cmds):
|
||||||
|
* abug-rom.c (_initialize_abug_rom init_abug-cmds):
|
||||||
|
* cpu32bug-rom.c (_initialize_cpu32bug_rom init_cpu32bug_cmds):
|
||||||
|
* mon960-rom.c (initialize_mon960 init_mon960_cmds):
|
||||||
|
* op50-rom.c (initialize_op50n init_op50n_cmds) :
|
||||||
|
* ppcbug-rom.c (_initialize_ppcbug_rom init_ppc_cmds) :
|
||||||
|
* sh3-rom.c (_initialize_sh3_rom init_sh3_cmds) :
|
||||||
|
* sparclet-rom.c (_initialize_sparcletinit_sparclet_cmds ) :
|
||||||
|
* remote-est.c ( _initialize_est init_est_cmds) :
|
||||||
|
* remote-hms.c ( _initialize_remote_hms init_hms_cmds) :
|
||||||
|
Convert all static initializations of monitor ops structures to
|
||||||
|
executable initializations in oreer tat additions to the data structure
|
||||||
|
definition can me made without repeating this editing exercise.
|
||||||
|
|
||||||
Mon Apr 27 10:43:04 1998 Jason Molenda (crash@bugshack.cygnus.com)
|
Mon Apr 27 10:43:04 1998 Jason Molenda (crash@bugshack.cygnus.com)
|
||||||
|
|
||||||
* gdb_string.h (strdup): Don't specify arguments in prototype.
|
* gdb_string.h (strdup): Don't specify arguments in prototype.
|
||||||
|
|
103
gdb/abug-rom.c
103
gdb/abug-rom.c
|
@ -92,61 +92,55 @@ static struct target_ops abug_ops;
|
||||||
|
|
||||||
static char *abug_inits[] = {"\r", NULL};
|
static char *abug_inits[] = {"\r", NULL};
|
||||||
|
|
||||||
static struct monitor_ops abug_cmds =
|
static struct monitor_ops abug_cmds ;
|
||||||
|
|
||||||
|
static void init_abug_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR,
|
abug_cmds.flags = MO_CLR_BREAK_USES_ADDR;
|
||||||
abug_inits, /* Init strings */
|
abug_cmds.init = abug_inits; /* Init strings */
|
||||||
"g\r", /* continue command */
|
abug_cmds.cont = "g\r"; /* continue command */
|
||||||
"t\r", /* single step */
|
abug_cmds.step = "t\r"; /* single step */
|
||||||
NULL, /* interrupt command */
|
abug_cmds.stop = NULL; /* interrupt command */
|
||||||
"br %x\r", /* set a breakpoint */
|
abug_cmds.set_break = "br %x\r"; /* set a breakpoint */
|
||||||
"nobr %x\r", /* clear a breakpoint */
|
abug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
|
||||||
"nobr\r", /* clear all breakpoints */
|
abug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
|
||||||
"bf %x:%x %x;b\r", /* fill (start count val) */
|
abug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
|
||||||
{
|
abug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
|
||||||
"ms %x %02x\r", /* setmem.cmdb (addr, value) */
|
abug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
|
||||||
"ms %x %04x\r", /* setmem.cmdw (addr, value) */
|
abug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
|
||||||
"ms %x %08x\r", /* setmem.cmdl (addr, value) */
|
abug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
abug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
abug_cmds.setmem.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.term */
|
abug_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term_cmd */
|
abug_cmds.getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
|
||||||
},
|
abug_cmds.getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
|
||||||
{
|
abug_cmds.getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdb (addr, len) */
|
abug_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdw (addr, len) */
|
abug_cmds.getmem.resp_delim = " "; /* getmem.resp_delim */
|
||||||
"md %x:%x;b\r", /* getmem.cmdl (addr, len) */
|
abug_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
abug_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
" ", /* getmem.resp_delim */
|
abug_cmds.setreg.cmd = "rm %s %x\r"; /* setreg.cmd (name, value) */
|
||||||
NULL, /* getmem.term */
|
abug_cmds.setreg.resp_delim = "="; /* setreg.resp_delim */
|
||||||
NULL, /* getmem.term_cmd */
|
abug_cmds.setreg.term = "? "; /* setreg.term */
|
||||||
},
|
abug_cmds.setreg.term_cmd = ".\r" ; /* setreg.term_cmd */
|
||||||
{
|
abug_cmds.getreg.cmd = "rm %s\r"; /* getreg.cmd (name) */
|
||||||
"rm %s %x\r", /* setreg.cmd (name, value) */
|
abug_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
|
||||||
"=", /* setreg.resp_delim */
|
abug_cmds.getreg.term = "? "; /* getreg.term */
|
||||||
"? ", /* setreg.term */
|
abug_cmds.getreg.term_cmd = ".\r" ; /* getreg.term_cmd */
|
||||||
".\r" /* setreg.term_cmd */
|
abug_cmds.dump_registers = "rd\r"; /* dump_registers */
|
||||||
},
|
abug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
|
||||||
{
|
abug_cmds.supply_register = abug_supply_register; /* supply_register */
|
||||||
"rm %s\r", /* getreg.cmd (name) */
|
abug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
"=", /* getreg.resp_delim */
|
abug_cmds.load = "lo 0\r"; /* download command */
|
||||||
"? ", /* getreg.term */
|
abug_cmds.loadresp = "\n"; /* load response */
|
||||||
".\r" /* getreg.term_cmd */
|
abug_cmds.prompt = "135Bug>"; /* monitor command prompt */
|
||||||
},
|
abug_cmds.line_term = "\r"; /* end-of-line terminator */
|
||||||
"rd\r", /* dump_registers */
|
abug_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
"\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)", /* register_pattern */
|
abug_cmds.target = &abug_ops; /* target operations */
|
||||||
abug_supply_register, /* supply_register */
|
abug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
abug_cmds.regnames = abug_regnames; /* registers names */
|
||||||
"lo 0\r", /* download command */
|
abug_cmds.magic = MONITOR_OPS_MAGIC ; /* magic */
|
||||||
"\n", /* load response */
|
};
|
||||||
"135Bug>", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-line terminator */
|
|
||||||
NULL, /* optional command terminator */
|
|
||||||
&abug_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
abug_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
abug_open(args, from_tty)
|
abug_open(args, from_tty)
|
||||||
|
@ -159,6 +153,7 @@ abug_open(args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_abug_rom ()
|
_initialize_abug_rom ()
|
||||||
{
|
{
|
||||||
|
init_abug_cmds() ;
|
||||||
init_monitor_ops (&abug_ops);
|
init_monitor_ops (&abug_ops);
|
||||||
|
|
||||||
abug_ops.to_shortname = "abug";
|
abug_ops.to_shortname = "abug";
|
||||||
|
|
|
@ -92,61 +92,54 @@ static struct target_ops cpu32bug_ops;
|
||||||
|
|
||||||
static char *cpu32bug_inits[] = {"\r", NULL};
|
static char *cpu32bug_inits[] = {"\r", NULL};
|
||||||
|
|
||||||
static struct monitor_ops cpu32bug_cmds =
|
static struct monitor_ops cpu32bug_cmds ;
|
||||||
|
static void init_cpu32bug_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR,
|
cpu32bug_cmds.flags = MO_CLR_BREAK_USES_ADDR;
|
||||||
cpu32bug_inits, /* Init strings */
|
cpu32bug_cmds.init = cpu32bug_inits; /* Init strings */
|
||||||
"g\r", /* continue command */
|
cpu32bug_cmds.cont = "g\r"; /* continue command */
|
||||||
"t\r", /* single step */
|
cpu32bug_cmds.step = "t\r"; /* single step */
|
||||||
NULL, /* interrupt command */
|
cpu32bug_cmds.stop = NULL; /* interrupt command */
|
||||||
"br %x\r", /* set a breakpoint */
|
cpu32bug_cmds.set_break = "br %x\r"; /* set a breakpoint */
|
||||||
"nobr %x\r", /* clear a breakpoint */
|
cpu32bug_cmds.clr_break = "nobr %x\r"; /* clear a breakpoint */
|
||||||
"nobr\r", /* clear all breakpoints */
|
cpu32bug_cmds.clr_all_break = "nobr\r"; /* clear all breakpoints */
|
||||||
"bf %x:%x %x;b\r", /* fill (start count val) */
|
cpu32bug_cmds.fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
|
||||||
{
|
cpu32bug_cmds.setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
|
||||||
"ms %x %02x\r", /* setmem.cmdb (addr, value) */
|
cpu32bug_cmds.setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
|
||||||
"ms %x %04x\r", /* setmem.cmdw (addr, value) */
|
cpu32bug_cmds.setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
|
||||||
"ms %x %08x\r", /* setmem.cmdl (addr, value) */
|
cpu32bug_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
cpu32bug_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
cpu32bug_cmds.setmem.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.term */
|
cpu32bug_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term_cmd */
|
cpu32bug_cmds.getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
|
||||||
},
|
cpu32bug_cmds.getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
|
||||||
{
|
cpu32bug_cmds.getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdb (addr, len) */
|
cpu32bug_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdw (addr, len) */
|
cpu32bug_cmds.getmem.resp_delim = " "; /* getmem.resp_delim */
|
||||||
"md %x:%x;b\r", /* getmem.cmdl (addr, len) */
|
cpu32bug_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
cpu32bug_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
" ", /* getmem.resp_delim */
|
cpu32bug_cmds.setreg.cmd = "rs %s %x\r"; /* setreg.cmd (name, value) */
|
||||||
NULL, /* getmem.term */
|
cpu32bug_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* getmem.term_cmd */
|
cpu32bug_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
},
|
cpu32bug_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
{
|
cpu32bug_cmds.getreg.cmd = "rs %s\r"; /* getreg.cmd (name) */
|
||||||
"rs %s %x\r", /* setreg.cmd (name, value) */
|
cpu32bug_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
cpu32bug_cmds.getreg.term = NULL; /* getreg.term */
|
||||||
NULL, /* setreg.term */
|
cpu32bug_cmds.getreg.term_cmd = NULL ; /* getreg.term_cmd */
|
||||||
NULL /* setreg.term_cmd */
|
cpu32bug_cmds.dump_registers = "rd\r"; /* dump_registers */
|
||||||
},
|
cpu32bug_cmds.register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
|
||||||
{
|
cpu32bug_cmds.supply_register = cpu32bug_supply_register; /* supply_register */
|
||||||
"rs %s\r", /* getreg.cmd (name) */
|
cpu32bug_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
"=", /* getreg.resp_delim */
|
cpu32bug_cmds.load = "lo\r"; /* download command */
|
||||||
NULL, /* getreg.term */
|
cpu32bug_cmds.loadresp = "\n"; /* load response */
|
||||||
NULL /* getreg.term_cmd */
|
cpu32bug_cmds.prompt = "CPU32Bug>"; /* monitor command prompt */
|
||||||
},
|
cpu32bug_cmds.line_term = "\r"; /* end-of-line terminator */
|
||||||
"rd\r", /* dump_registers */
|
cpu32bug_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
"\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)", /* register_pattern */
|
cpu32bug_cmds.target = &cpu32bug_ops; /* target operations */
|
||||||
cpu32bug_supply_register, /* supply_register */
|
cpu32bug_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
cpu32bug_cmds.regnames = cpu32bug_regnames; /* registers names */
|
||||||
"lo\r", /* download command */
|
cpu32bug_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
|
||||||
"\n", /* load response */
|
}; /* init_cpu32bug_cmds */
|
||||||
"CPU32Bug>", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-line terminator */
|
|
||||||
NULL, /* optional command terminator */
|
|
||||||
&cpu32bug_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
cpu32bug_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cpu32bug_open(args, from_tty)
|
cpu32bug_open(args, from_tty)
|
||||||
|
@ -159,6 +152,7 @@ cpu32bug_open(args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_cpu32bug_rom ()
|
_initialize_cpu32bug_rom ()
|
||||||
{
|
{
|
||||||
|
init_cpu32bug_cmds() ;
|
||||||
init_monitor_ops (&cpu32bug_ops);
|
init_monitor_ops (&cpu32bug_ops);
|
||||||
|
|
||||||
cpu32bug_ops.to_shortname = "cpu32bug";
|
cpu32bug_ops.to_shortname = "cpu32bug";
|
||||||
|
|
119
gdb/mon960-rom.c
119
gdb/mon960-rom.c
|
@ -148,75 +148,66 @@ static char *mon960_inits[] = {"\n\r\r\r\r\r\r\r\r\r\r\r\r\r\r\n\r\n\r\n", NULL}
|
||||||
static char *mon960_inits[] = { "\r", NULL};
|
static char *mon960_inits[] = { "\r", NULL};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct monitor_ops mon960_cmds =
|
static struct monitor_ops mon960_cmds ;
|
||||||
|
static void init_mon960_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR
|
mon960_cmds.flags = MO_CLR_BREAK_USES_ADDR
|
||||||
| MO_NO_ECHO_ON_OPEN
|
| MO_NO_ECHO_ON_OPEN | MO_SEND_BREAK_ON_STOP | MO_GETMEM_READ_SINGLE ; /* flags */
|
||||||
| MO_SEND_BREAK_ON_STOP
|
mon960_cmds.init = mon960_inits; /* Init strings */
|
||||||
| MO_GETMEM_READ_SINGLE, /* flags */
|
mon960_cmds.cont = "go\n\r"; /* continue command */
|
||||||
mon960_inits, /* Init strings */
|
mon960_cmds.step = "st\n\r"; /* single step */
|
||||||
"go\n\r", /* continue command */
|
mon960_cmds.stop = NULL; /* break interrupts the program */
|
||||||
"st\n\r", /* single step */
|
mon960_cmds.set_break = NULL; /* set a breakpoint */
|
||||||
NULL, /* break interrupts the program */
|
mon960_cmds.clr_break = /* can't use "br" because only 2 hw bps are supported */
|
||||||
NULL, /* set a breakpoint */
|
mon960_cmds.clr_all_break = NULL; /* clear a breakpoint - "de" is for hw bps */
|
||||||
/* can't use "br" because only 2 hw bps are supported */
|
|
||||||
NULL, /* clear a breakpoint - "de" is for hw bps */
|
|
||||||
NULL, /* clear all breakpoints */
|
NULL, /* clear all breakpoints */
|
||||||
NULL, /* fill (start end val) */
|
mon960_cmds.fill = NULL; /* fill (start end val) */
|
||||||
/* can't use "fi" because it takes words, not bytes */
|
/* can't use "fi" because it takes words, not bytes */
|
||||||
{
|
/* can't use "mb", "md" or "mo" because they require interaction */
|
||||||
/* can't use "mb", "md" or "mo" because they require interaction */
|
mon960_cmds.setmem.cmdb = NULL; /* setmem.cmdb (addr, value) */
|
||||||
NULL, /* setmem.cmdb (addr, value) */
|
mon960_cmds.setmem.cmdw = NULL; /* setmem.cmdw (addr, value) */
|
||||||
NULL, /* setmem.cmdw (addr, value) */
|
mon960_cmds.setmem.cmdl = "md %x %x\n\r"; /* setmem.cmdl (addr, value) */
|
||||||
"md %x %x\n\r", /* setmem.cmdl (addr, value) */
|
mon960_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
mon960_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
|
||||||
NULL, /* setmem.resp_delim */
|
mon960_cmds.setmem.term = NULL; /* setmem.term */
|
||||||
NULL, /* setmem.term */
|
mon960_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
|
||||||
NULL, /* setmem.term_cmd */
|
/* since the parsing of multiple bytes is difficult due to
|
||||||
},
|
interspersed addresses, we'll only read 1 value at a time,
|
||||||
{
|
even tho these can handle a count */
|
||||||
/* since the parsing of multiple bytes is difficult due to
|
mon960_cmds.getmem.cmdb = "db %x\n\r"; /* getmem.cmdb (addr, #bytes) */
|
||||||
interspersed addresses, we'll only read 1 value at a time,
|
mon960_cmds.getmem.cmdw = "ds %x\n\r"; /* getmem.cmdw (addr, #swords) */
|
||||||
even tho these can handle a count */
|
mon960_cmds.getmem.cmdl = "di %x\n\r"; /* getmem.cmdl (addr, #words) */
|
||||||
"db %x\n\r", /* getmem.cmdb (addr, #bytes) */
|
mon960_cmds.getmem.cmdll = "dd %x\n\r"; /* getmem.cmdll (addr, #dwords) */
|
||||||
"ds %x\n\r", /* getmem.cmdw (addr, #swords) */
|
mon960_cmds.getmem.resp_delim = " : "; /* getmem.resp_delim */
|
||||||
"di %x\n\r", /* getmem.cmdl (addr, #words) */
|
mon960_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
"dd %x\n\r", /* getmem.cmdll (addr, #dwords) */
|
mon960_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
" : ", /* getmem.resp_delim */
|
mon960_cmds.setreg.cmd = "md %s %x\n\r"; /* setreg.cmd (name, value) */
|
||||||
NULL, /* getmem.term */
|
mon960_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* getmem.term_cmd */
|
mon960_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
},
|
mon960_cmds.setreg.term_cmd = NULL, /* setreg.term_cmd */
|
||||||
{
|
mon960_cmds.getreg.cmd = "di %s\n\r"; /* getreg.cmd (name) */
|
||||||
"md %s %x\n\r", /* setreg.cmd (name, value) */
|
mon960_cmds.getreg.resp_delim = " : "; /* getreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
mon960_cmds.getreg.term = NULL; /* getreg.term */
|
||||||
NULL, /* setreg.term */
|
mon960_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
|
||||||
NULL /* setreg.term_cmd */
|
mon960_cmds.dump_registers = "re\n\r"; /* dump_registers */
|
||||||
},
|
mon960_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
|
||||||
{
|
mon960_cmds.supply_register = NULL; /* supply_register */
|
||||||
"di %s\n\r", /* getreg.cmd (name) */
|
|
||||||
" : ", /* getreg.resp_delim */
|
|
||||||
NULL, /* getreg.term */
|
|
||||||
NULL, /* getreg.term_cmd */
|
|
||||||
},
|
|
||||||
"re\n\r", /* dump_registers */
|
|
||||||
"\\(\\w+\\)=\\([0-9a-fA-F]+\\)", /* register_pattern */
|
|
||||||
NULL, /* supply_register */
|
|
||||||
#ifdef USE_GENERIC_LOAD
|
#ifdef USE_GENERIC_LOAD
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
mon960_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
NULL, /* download command */
|
mon960_cmds.load = NULL; /* download command */
|
||||||
NULL, /* load response */
|
mon960_cmds.loadresp = NULL; /* load response */
|
||||||
#else
|
#else
|
||||||
mon960_load, /* load_routine (defaults to SRECs) */
|
mon960_cmds.load_routine = mon960_load ; /* load_routine (defaults to SRECs) */
|
||||||
"do\n\r", /* download command */
|
mon960_cmds.load = "do\n\r"; /* download command */
|
||||||
"Downloading\n\r", /* load response */
|
mon960_cmds.loadresp = "Downloading\n\r" ;/* load response */
|
||||||
#endif
|
#endif
|
||||||
"=>", /* monitor command prompt */
|
mon960_cmds.prompt = "=>"; /* monitor command prompt */
|
||||||
"\n\r", /* end-of-command delimitor */
|
mon960_cmds.line_term = "\n\r"; /* end-of-command delimitor */
|
||||||
NULL, /* optional command terminator */
|
mon960_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
&mon960_ops, /* target operations */
|
mon960_cmds.target = &mon960_ops; /* target operations */
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
mon960_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
mon960_regnames, /* registers names */
|
mon960_cmds.regnames = mon960_regnames; /* registers names */
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
mon960_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
116
gdb/op50-rom.c
116
gdb/op50-rom.c
|
@ -55,73 +55,66 @@ static struct target_ops op50n_ops;
|
||||||
|
|
||||||
static char *op50n_inits[] = {".\r", NULL};
|
static char *op50n_inits[] = {".\r", NULL};
|
||||||
|
|
||||||
static struct monitor_ops op50n_cmds =
|
static struct monitor_ops op50n_cmds ;
|
||||||
|
static void init_op50n_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR /*| MO_GETMEM_READ_SINGLE*/, /* flags */
|
op50n_cmds.flags = MO_CLR_BREAK_USES_ADDR /*| MO_GETMEM_READ_SINGLE*/; /* flags */
|
||||||
op50n_inits, /* Init strings */
|
op50n_cmds.init = op50n_inits; /* Init strings */
|
||||||
"g\r", /* continue command */
|
op50n_cmds.cont = "g\r"; /* continue command */
|
||||||
"t\r", /* single step */
|
op50n_cmds.step = "t\r"; /* single step */
|
||||||
"\003.\r", /* Interrupt char */
|
op50n_cmds.stop = "\003.\r"; /* Interrupt char */
|
||||||
"b %x\r", /* set a breakpoint */
|
op50n_cmds.set_break = "b %x\r"; /* set a breakpoint */
|
||||||
"b %x,0\r", /* clear breakpoint at addr */
|
op50n_cmds.clr_break = "b %x;0\r"; /* clear breakpoint at addr */
|
||||||
"bx\r", /* clear all breakpoints */
|
op50n_cmds.clr_all_break = "bx\r"; /* clear all breakpoints */
|
||||||
"fx %x s%x %x\r", /* memory fill cmd (addr, len, val) */
|
op50n_cmds.fill = "fx %x s%x %x\r"; /* memory fill cmd (addr, len, val) */
|
||||||
{
|
op50n_cmds.setmem.cmdb = "sx %x %x\r"; /* setmem.cmdb (addr, value) */
|
||||||
"sx %x %x\r", /* setmem.cmdb (addr, value) */
|
op50n_cmds.setmem.cmdw = "sh %x %x\r"; /* setmem.cmdw (addr, value) */
|
||||||
"sh %x %x\r", /* setmem.cmdw (addr, value) */
|
op50n_cmds.setmem.cmdl = "s %x %x\r"; /* setmem.cmdl (addr, value) */
|
||||||
"s %x %x\r", /* setmem.cmdl (addr, value) */
|
op50n_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
op50n_cmds.setmem.resp_delim = NULL; /* setmem.resp_delim */
|
||||||
NULL, /* setmem.resp_delim */
|
op50n_cmds.setmem.term = NULL; /* setmem.term */
|
||||||
NULL, /* setmem.term */
|
op50n_cmds.setmem.term_cmd = NULL; /* setmem.term_cmd */
|
||||||
NULL, /* setmem.term_cmd */
|
|
||||||
},
|
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
"sx %x\r", /* getmem.cmdb (addr, len) */
|
"sx %x\r", /* getmem.cmdb (addr, len) */
|
||||||
"sh %x\r", /* getmem.cmdw (addr, len) */
|
"sh %x\r", /* getmem.cmdw (addr, len) */
|
||||||
"s %x\r", /* getmem.cmdl (addr, len) */
|
"s %x\r", /* getmem.cmdl (addr, len) */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
NULL, /* getmem.cmdll (addr, len) */
|
||||||
" : ", /* getmem.resp_delim */
|
" : ", /* getmem.resp_delim */
|
||||||
" ", /* getmem.term */
|
" ", /* getmem.term */
|
||||||
".\r", /* getmem.term_cmd */
|
".\r", /* getmem.term_cmd */
|
||||||
},
|
} ;
|
||||||
#else
|
#else
|
||||||
{
|
op50n_cmds.getmem.cmdb = "dx %x s%x\r"; /* getmem.cmdb (addr, len) */
|
||||||
"dx %x s%x\r", /* getmem.cmdb (addr, len) */
|
op50n_cmds.getmem.cmdw = NULL; /* getmem.cmdw (addr, len) */
|
||||||
NULL, /* getmem.cmdw (addr, len) */
|
op50n_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, len) */
|
||||||
NULL, /* getmem.cmdl (addr, len) */
|
op50n_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
op50n_cmds.getmem.resp_delim = " : "; /* getmem.resp_delim */
|
||||||
" : ", /* getmem.resp_delim */
|
op50n_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.term */
|
op50n_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
NULL, /* getmem.term_cmd */
|
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
{
|
op50n_cmds.setreg.cmd = "x %s %x\r"; /* setreg.cmd (name, value) */
|
||||||
"x %s %x\r", /* setreg.cmd (name, value) */
|
op50n_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
op50n_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.term */
|
op50n_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term_cmd */
|
op50n_cmds.getreg.cmd = "x %s\r"; /* getreg.cmd (name) */
|
||||||
},
|
op50n_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
|
||||||
{
|
op50n_cmds.getreg.term = " "; /* getreg.term */
|
||||||
"x %s\r", /* getreg.cmd (name) */
|
op50n_cmds.getreg.term_cmd = ".\r"; /* getreg.term_cmd */
|
||||||
"=", /* getreg.resp_delim */
|
op50n_cmds.dump_registers = NULL; /* dump_registers */
|
||||||
" ", /* getreg.term */
|
op50n_cmds.register_pattern = NULL; /* register_pattern */
|
||||||
".\r", /* getreg.term_cmd */
|
op50n_cmds.supply_register = NULL; /* supply_register */
|
||||||
},
|
op50n_cmds.load_routine = NULL; /* load routine */
|
||||||
NULL, /* dump_registers */
|
op50n_cmds.load = "r 0\r"; /* download command */
|
||||||
NULL, /* register_pattern */
|
op50n_cmds.loadresp = NULL; /* load response */
|
||||||
NULL, /* supply_register */
|
op50n_cmds.prompt = "\n#"; /* monitor command prompt */
|
||||||
NULL, /* load routine */
|
op50n_cmds.line_term = "\r"; /* end-of-command delimitor */
|
||||||
"r 0\r", /* download command */
|
op50n_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
NULL, /* load response */
|
op50n_cmds.target = &op50n_ops; /* target operations */
|
||||||
"\n#", /* monitor command prompt */
|
op50n_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
"\r", /* end-of-command delimitor */
|
op50n_cmds.regnames = op50n_regnames; /* register names */
|
||||||
NULL, /* optional command terminator */
|
op50n_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
|
||||||
&op50n_ops, /* target operations */
|
};
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
op50n_regnames, /* register names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
op50n_open (args, from_tty)
|
op50n_open (args, from_tty)
|
||||||
|
@ -134,6 +127,7 @@ op50n_open (args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_op50n ()
|
_initialize_op50n ()
|
||||||
{
|
{
|
||||||
|
init_op50n_cmds() ;
|
||||||
init_monitor_ops (&op50n_ops);
|
init_monitor_ops (&op50n_ops);
|
||||||
|
|
||||||
op50n_ops.to_shortname = "op50n";
|
op50n_ops.to_shortname = "op50n";
|
||||||
|
|
108
gdb/ppcbug-rom.c
108
gdb/ppcbug-rom.c
|
@ -132,65 +132,59 @@ static struct target_ops ppcbug_ops1;
|
||||||
|
|
||||||
static char *ppcbug_inits[] = {"\r", NULL};
|
static char *ppcbug_inits[] = {"\r", NULL};
|
||||||
|
|
||||||
#define PPC_CMDS(LOAD_CMD, OPS) \
|
static void init_ppc_cmds(
|
||||||
{ \
|
char * LOAD_CMD,
|
||||||
MO_CLR_BREAK_USES_ADDR | MO_HANDLE_NL, \
|
struct monitor_ops * OPS,
|
||||||
ppcbug_inits, /* Init strings */ \
|
struct target_ops * targops)
|
||||||
"g\r", /* continue command */ \
|
{
|
||||||
"t\r", /* single step */ \
|
OPS->flags = MO_CLR_BREAK_USES_ADDR | MO_HANDLE_NL;
|
||||||
NULL, /* interrupt command */ \
|
OPS->init = ppcbug_inits; /* Init strings */
|
||||||
"br %x\r", /* set a breakpoint */ \
|
OPS->cont = "g\r"; /* continue command */
|
||||||
"nobr %x\r", /* clear a breakpoint */ \
|
OPS->step = "t\r"; /* single step */
|
||||||
"nobr\r", /* clear all breakpoints */ \
|
OPS->stop = NULL; /* interrupt command */
|
||||||
"bf %x:%x %x;b\r", /* fill (start count val) */ \
|
OPS->set_break = "br %x\r"; /* set a breakpoint */
|
||||||
{ \
|
OPS->clr_break = "nobr %x\r"; /* clear a breakpoint */
|
||||||
"ms %x %02x\r", /* setmem.cmdb (addr, value) */ \
|
OPS->clr_all_break = "nobr\r"; /* clear all breakpoints */
|
||||||
"ms %x %04x\r", /* setmem.cmdw (addr, value) */ \
|
OPS->fill = "bf %x:%x %x;b\r"; /* fill (start count val) */
|
||||||
"ms %x %08x\r", /* setmem.cmdl (addr, value) */ \
|
OPS->setmem.cmdb = "ms %x %02x\r"; /* setmem.cmdb (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */ \
|
OPS->setmem.cmdw = "ms %x %04x\r"; /* setmem.cmdw (addr, value) */
|
||||||
NULL, /* setreg.resp_delim */ \
|
OPS->setmem.cmdl = "ms %x %08x\r"; /* setmem.cmdl (addr, value) */
|
||||||
NULL, /* setreg.term */ \
|
OPS->setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setreg.term_cmd */ \
|
OPS->setmem.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
}, \
|
OPS->setmem.term = NULL; /* setreg.term */
|
||||||
{ \
|
OPS->setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
"md %x:%x;b\r", /* getmem.cmdb (addr, len) */ \
|
OPS->getmem.cmdb = "md %x:%x;b\r"; /* getmem.cmdb (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdw (addr, len) */ \
|
OPS->getmem.cmdw = "md %x:%x;b\r"; /* getmem.cmdw (addr, len) */
|
||||||
"md %x:%x;b\r", /* getmem.cmdl (addr, len) */ \
|
OPS->getmem.cmdl = "md %x:%x;b\r"; /* getmem.cmdl (addr, len) */
|
||||||
NULL, /* getmem.cmdll (addr, len) */ \
|
OPS->getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
" ", /* getmem.resp_delim */ \
|
OPS->getmem.resp_delim = " "; /* getmem.resp_delim */
|
||||||
NULL, /* getmem.term */ \
|
OPS->getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.term_cmd */ \
|
OPS->getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
}, \
|
OPS->setreg.cmd = "rs %s %x\r"; /* setreg.cmd (name, value) */
|
||||||
{ \
|
OPS->setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
"rs %s %x\r", /* setreg.cmd (name, value) */ \
|
OPS->setreg.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.resp_delim */ \
|
OPS->setreg.term_cmd = NULL ; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term */ \
|
OPS->getreg.cmd = "rs %s\r"; /* getreg.cmd (name) */
|
||||||
NULL /* setreg.term_cmd */ \
|
OPS->getreg.resp_delim = "="; /* getreg.resp_delim */
|
||||||
}, \
|
OPS->getreg.term = NULL; /* getreg.term */
|
||||||
{ \
|
OPS->getreg.term_cmd = NULL ; /* getreg.term_cmd */
|
||||||
"rs %s\r", /* getreg.cmd (name) */ \
|
OPS->register_pattern = "\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)"; /* register_pattern */
|
||||||
"=", /* getreg.resp_delim */ \
|
OPS->supply_register = ppcbug_supply_register; /* supply_register */
|
||||||
NULL, /* getreg.term */ \
|
OPS->load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
NULL /* getreg.term_cmd */ \
|
OPS->load = LOAD_CMD; /* download command */
|
||||||
}, \
|
OPS->loadresp = NULL; /* load response */
|
||||||
"rd\r", /* dump_registers */ \
|
OPS->prompt = "PPC1-Bug>"; /* monitor command prompt */
|
||||||
"\\(\\w+\\) +=\\([0-9a-fA-F]+\\b\\)", /* register_pattern */ \
|
OPS->line_term = "\r"; /* end-of-line terminator */
|
||||||
ppcbug_supply_register, /* supply_register */ \
|
OPS->cmd_end = NULL; /* optional command terminator */
|
||||||
NULL, /* load_routine (defaults to SRECs) */ \
|
OPS->target = targops ; /* target operations */
|
||||||
LOAD_CMD, /* download command */ \
|
OPS->stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
NULL, /* load response */ \
|
OPS->regnames = ppcbug_regnames; /* registers names */
|
||||||
"PPC1-Bug>", /* monitor command prompt */ \
|
OPS->magic = MONITOR_OPS_MAGIC ; /* magic */
|
||||||
"\r", /* end-of-line terminator */ \
|
|
||||||
NULL, /* optional command terminator */ \
|
|
||||||
&OPS, /* target operations */ \
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */ \
|
|
||||||
ppcbug_regnames, /* registers names */ \
|
|
||||||
MONITOR_OPS_MAGIC /* magic */ \
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct monitor_ops ppcbug_cmds0 = PPC_CMDS("lo 0\r", ppcbug_ops0);
|
static struct monitor_ops ppcbug_cmds0 ;
|
||||||
static struct monitor_ops ppcbug_cmds1 = PPC_CMDS("lo 1\r", ppcbug_ops1);
|
static struct monitor_ops ppcbug_cmds1 ;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ppcbug_open0(args, from_tty)
|
ppcbug_open0(args, from_tty)
|
||||||
|
@ -211,6 +205,8 @@ ppcbug_open1(args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_ppcbug_rom ()
|
_initialize_ppcbug_rom ()
|
||||||
{
|
{
|
||||||
|
init_ppc_cmds("lo 0\r", &ppcbug_cmds0, &ppcbug_ops0) ;
|
||||||
|
init_ppc_cmds("lo 1\r", &ppcbug_cmds1, &ppcbug_ops1);
|
||||||
init_monitor_ops (&ppcbug_ops0);
|
init_monitor_ops (&ppcbug_ops0);
|
||||||
|
|
||||||
ppcbug_ops0.to_shortname = "ppcbug";
|
ppcbug_ops0.to_shortname = "ppcbug";
|
||||||
|
|
104
gdb/remote-est.c
104
gdb/remote-est.c
|
@ -95,62 +95,55 @@ static struct target_ops est_ops;
|
||||||
static char *est_inits[] = {"he\r", /* Resets the prompt, and clears repeated cmds */
|
static char *est_inits[] = {"he\r", /* Resets the prompt, and clears repeated cmds */
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
static struct monitor_ops est_cmds =
|
static struct monitor_ops est_cmds ;
|
||||||
|
static void init_est_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_NEED_REGDUMP_AFTER_CONT |
|
est_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_NEED_REGDUMP_AFTER_CONT |
|
||||||
MO_SREC_ACK | MO_SREC_ACK_PLUS,
|
MO_SREC_ACK | MO_SREC_ACK_PLUS ;
|
||||||
est_inits, /* Init strings */
|
est_cmds.init = est_inits; /* Init strings */
|
||||||
"go\r", /* continue command */
|
est_cmds.cont = "go\r"; /* continue command */
|
||||||
"sidr\r", /* single step */
|
est_cmds.step = "sidr\r"; /* single step */
|
||||||
"\003", /* ^C interrupts the program */
|
est_cmds.stop = "\003"; /* ^C interrupts the program */
|
||||||
"sb %x\r", /* set a breakpoint */
|
est_cmds.set_break = "sb %x\r"; /* set a breakpoint */
|
||||||
"rb %x\r", /* clear a breakpoint */
|
est_cmds.clr_break = "rb %x\r"; /* clear a breakpoint */
|
||||||
"rb\r", /* clear all breakpoints */
|
est_cmds.clr_all_break = "rb\r"; /* clear all breakpoints */
|
||||||
"bfb %x %x %x\r", /* fill (start end val) */
|
est_cmds.fill = "bfb %x %x %x\r"; /* fill (start end val) */
|
||||||
{
|
est_cmds.setmem.cmdb = "smb %x %x\r"; /* setmem.cmdb (addr, value) */
|
||||||
"smb %x %x\r", /* setmem.cmdb (addr, value) */
|
est_cmds.setmem.cmdw = "smw %x %x\r"; /* setmem.cmdw (addr, value) */
|
||||||
"smw %x %x\r", /* setmem.cmdw (addr, value) */
|
est_cmds.setmem.cmdl = "sml %x %x\r"; /* setmem.cmdl (addr, value) */
|
||||||
"sml %x %x\r", /* setmem.cmdl (addr, value) */
|
est_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
est_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
est_cmds.setmem.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.term */
|
est_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term_cmd */
|
est_cmds.getmem.cmdb = "dmb %x %x\r"; /* getmem.cmdb (addr, len) */
|
||||||
},
|
est_cmds.getmem.cmdw = "dmw %x %x\r"; /* getmem.cmdw (addr, len) */
|
||||||
{
|
est_cmds.getmem.cmdl = "dml %x %x\r"; /* getmem.cmdl (addr, len) */
|
||||||
"dmb %x %x\r", /* getmem.cmdb (addr, len) */
|
est_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
"dmw %x %x\r", /* getmem.cmdw (addr, len) */
|
est_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
|
||||||
"dml %x %x\r", /* getmem.cmdl (addr, len) */
|
est_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
est_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
": ", /* getmem.resp_delim */
|
est_cmds.setreg.cmd = "sr %s %x\r"; /* setreg.cmd (name, value) */
|
||||||
NULL, /* getmem.term */
|
est_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* getmem.term_cmd */
|
est_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
},
|
est_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
{
|
est_cmds.getreg.cmd = "dr %s\r"; /* getreg.cmd (name) */
|
||||||
"sr %s %x\r", /* setreg.cmd (name, value) */
|
est_cmds.getreg.resp_delim = " = "; /* getreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
est_cmds.getreg.term = NULL; /* getreg.term */
|
||||||
NULL, /* setreg.term */
|
est_cmds.getreg.term_cmd = NULL ; /* getreg.term_cmd */
|
||||||
NULL /* setreg.term_cmd */
|
est_cmds.dump_registers = "dr\r"; /* dump_registers */
|
||||||
},
|
est_cmds.register_pattern = "\\(\\w+\\) = \\([0-9a-fA-F]+\\)"; /* register_pattern */
|
||||||
{
|
est_cmds.supply_register = est_supply_register; /* supply_register */
|
||||||
"dr %s\r", /* getreg.cmd (name) */
|
est_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
" = ", /* getreg.resp_delim */
|
est_cmds.load = "dl\r"; /* download command */
|
||||||
NULL, /* getreg.term */
|
est_cmds.loadresp = "+"; /* load response */
|
||||||
NULL /* getreg.term_cmd */
|
est_cmds.prompt = ">BKM>"; /* monitor command prompt */
|
||||||
},
|
est_cmds.line_term = "\r"; /* end-of-line terminator */
|
||||||
"dr\r", /* dump_registers */
|
est_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
"\\(\\w+\\) = \\([0-9a-fA-F]+\\)", /* register_pattern */
|
est_cmds.target = &est_ops; /* target operations */
|
||||||
est_supply_register, /* supply_register */
|
est_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
est_cmds.regnames = est_regnames; /* registers names */
|
||||||
"dl\r", /* download command */
|
est_cmds.magic = MONITOR_OPS_MAGIC ; /* magic */
|
||||||
"+", /* load response */
|
} /* init_est_cmds */
|
||||||
">BKM>", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-line terminator */
|
|
||||||
NULL, /* optional command terminator */
|
|
||||||
&est_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
est_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
est_open(args, from_tty)
|
est_open(args, from_tty)
|
||||||
|
@ -163,6 +156,7 @@ est_open(args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_est ()
|
_initialize_est ()
|
||||||
{
|
{
|
||||||
|
init_est_cmds() ;
|
||||||
init_monitor_ops (&est_ops);
|
init_monitor_ops (&est_ops);
|
||||||
|
|
||||||
est_ops.to_shortname = "est";
|
est_ops.to_shortname = "est";
|
||||||
|
|
103
gdb/remote-hms.c
103
gdb/remote-hms.c
|
@ -26,7 +26,6 @@
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
|
|
||||||
static void hms_open PARAMS ((char *args, int from_tty));
|
static void hms_open PARAMS ((char *args, int from_tty));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hms_supply_register (regname, regnamelen, val, vallen)
|
hms_supply_register (regname, regnamelen, val, vallen)
|
||||||
char *regname;
|
char *regname;
|
||||||
|
@ -83,61 +82,54 @@ static char *hms_inits[] =
|
||||||
{"\003", /* Resets the prompt, and clears repeated cmds */
|
{"\003", /* Resets the prompt, and clears repeated cmds */
|
||||||
NULL};
|
NULL};
|
||||||
|
|
||||||
static struct monitor_ops hms_cmds =
|
static struct monitor_ops hms_cmds ;
|
||||||
|
static void init_hms_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_GETMEM_NEEDS_RANGE,
|
hms_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_FILL_USES_ADDR | MO_GETMEM_NEEDS_RANGE;
|
||||||
hms_inits, /* Init strings */
|
hms_cmds.init = hms_inits; /* Init strings */
|
||||||
"g\r", /* continue command */
|
hms_cmds.cont = "g\r"; /* continue command */
|
||||||
"s\r", /* single step */
|
hms_cmds.step = "s\r"; /* single step */
|
||||||
"\003", /* ^C interrupts the program */
|
hms_cmds.stop = "\003"; /* ^C interrupts the program */
|
||||||
"b %x\r", /* set a breakpoint */
|
hms_cmds.set_break = "b %x\r"; /* set a breakpoint */
|
||||||
"b - %x\r", /* clear a breakpoint */
|
hms_cmds.clr_break = "b - %x\r"; /* clear a breakpoint */
|
||||||
"b -\r", /* clear all breakpoints */
|
hms_cmds.clr_all_break = "b -\r"; /* clear all breakpoints */
|
||||||
"f %x %x %x\r", /* fill (start end val) */
|
hms_cmds.fill = "f %x %x %x\r"; /* fill (start end val) */
|
||||||
{
|
hms_cmds.setmem.cmdb = "m.b %x=%x\r"; /* setmem.cmdb (addr, value) */
|
||||||
"m.b %x=%x\r", /* setmem.cmdb (addr, value) */
|
hms_cmds.setmem.cmdw = "m.w %x=%x\r"; /* setmem.cmdw (addr, value) */
|
||||||
"m.w %x=%x\r", /* setmem.cmdw (addr, value) */
|
hms_cmds.setmem.cmdl = NULL; /* setmem.cmdl (addr, value) */
|
||||||
NULL, /* setmem.cmdl (addr, value) */
|
hms_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
hms_cmds.setmem.resp_delim = NULL;/* setreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
hms_cmds.setmem.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.term */
|
hms_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term_cmd */
|
hms_cmds.getmem.cmdb = "m.b %x %x\r"; /* getmem.cmdb (addr, addr) */
|
||||||
},
|
hms_cmds.getmem.cmdw = "m.w %x %x\r"; /* getmem.cmdw (addr, addr) */
|
||||||
{
|
hms_cmds.getmem.cmdl = NULL; /* getmem.cmdl (addr, addr) */
|
||||||
"m.b %x %x\r", /* getmem.cmdb (addr, addr) */
|
hms_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, addr) */
|
||||||
"m.w %x %x\r", /* getmem.cmdw (addr, addr) */
|
hms_cmds.getmem.resp_delim = ": ";/* getmem.resp_delim */
|
||||||
NULL, /* getmem.cmdl (addr, addr) */
|
hms_cmds.getmem.term = ">"; /* getmem.term */
|
||||||
NULL, /* getmem.cmdll (addr, addr) */
|
hms_cmds.getmem.term_cmd = "\003";/* getmem.term_cmd */
|
||||||
": ", /* getmem.resp_delim */
|
hms_cmds.setreg.cmd = "r %s=%x\r";/* setreg.cmd (name, value) */
|
||||||
">", /* getmem.term */
|
hms_cmds.setreg.resp_delim = NULL;/* setreg.resp_delim */
|
||||||
"\003", /* getmem.term_cmd */
|
hms_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
},
|
hms_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
{
|
hms_cmds.getreg.cmd = "r %s\r"; /* getreg.cmd (name) */
|
||||||
"r %s=%x\r", /* setreg.cmd (name, value) */
|
hms_cmds.getreg.resp_delim = " (";/* getreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
hms_cmds.getreg.term = ":"; /* getreg.term */
|
||||||
NULL, /* setreg.term */
|
hms_cmds.getreg.term_cmd = "\003";/* getreg.term_cmd */
|
||||||
NULL /* setreg.term_cmd */
|
hms_cmds.dump_registers = "r\r"; /* dump_registers */
|
||||||
},
|
hms_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
|
||||||
{
|
hms_cmds.supply_register = hms_supply_register; /* supply_register */
|
||||||
"r %s\r", /* getreg.cmd (name) */
|
hms_cmds.load_routine = NULL; /* load_routine (defaults to SRECs) */
|
||||||
" (", /* getreg.resp_delim */
|
hms_cmds.load = "tl\r"; /* download command */
|
||||||
":", /* getreg.term */
|
hms_cmds.loadresp = NULL; /* load response */
|
||||||
"\003", /* getreg.term_cmd */
|
hms_cmds.prompt = ">"; /* monitor command prompt */
|
||||||
},
|
hms_cmds.line_term = "\r"; /* end-of-command delimitor */
|
||||||
"r\r", /* dump_registers */
|
hms_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
"\\(\\w+\\)=\\([0-9a-fA-F]+\\)", /* register_pattern */
|
hms_cmds.target = &hms_ops; /* target operations */
|
||||||
hms_supply_register, /* supply_register */
|
hms_cmds.stopbits = SERIAL_1_STOPBITS;/* number of stop bits */
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
hms_cmds.regnames = hms_regnames; /* registers names */
|
||||||
"tl\r", /* download command */
|
hms_cmds.magic = MONITOR_OPS_MAGIC; /* magic */
|
||||||
NULL, /* load response */
|
} /* init_hms-cmds */
|
||||||
">", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-command delimitor */
|
|
||||||
NULL, /* optional command terminator */
|
|
||||||
&hms_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
hms_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hms_open (args, from_tty)
|
hms_open (args, from_tty)
|
||||||
|
@ -152,6 +144,7 @@ int write_dos_tick_delay;
|
||||||
void
|
void
|
||||||
_initialize_remote_hms ()
|
_initialize_remote_hms ()
|
||||||
{
|
{
|
||||||
|
init_hms_cmds() ;
|
||||||
init_monitor_ops (&hms_ops);
|
init_monitor_ops (&hms_ops);
|
||||||
|
|
||||||
hms_ops.to_shortname = "hms";
|
hms_ops.to_shortname = "hms";
|
||||||
|
|
104
gdb/rom68k-rom.c
104
gdb/rom68k-rom.c
|
@ -93,62 +93,55 @@ static struct target_ops rom68k_ops;
|
||||||
|
|
||||||
static char *rom68k_inits[] = {".\r\r", NULL}; /* Exits pm/pr & download cmds */
|
static char *rom68k_inits[] = {".\r\r", NULL}; /* Exits pm/pr & download cmds */
|
||||||
|
|
||||||
static struct monitor_ops rom68k_cmds =
|
static struct monitor_ops rom68k_cmds ;
|
||||||
|
static void init_rom68k_cmds(void)
|
||||||
{
|
{
|
||||||
0, /* flags */
|
rom68k_cmds.flags = 0;
|
||||||
rom68k_inits, /* monitor init string */
|
rom68k_cmds.init = rom68k_inits; /* monitor init string */
|
||||||
"go\r", /* continue command */
|
rom68k_cmds.cont = "go\r";
|
||||||
"st\r", /* single step */
|
rom68k_cmds.step = "st\r";
|
||||||
NULL, /* No way to interrupt program */
|
rom68k_cmds.stop = NULL;
|
||||||
"db %x\r", /* set a breakpoint */
|
rom68k_cmds.set_break = "db %x\r";
|
||||||
"cb %x\r", /* clear a breakpoint */
|
rom68k_cmds.clr_break = "cb %x\r";
|
||||||
"cb *\r", /* clear all breakpoints */
|
rom68k_cmds.clr_all_break = "cb *\r";
|
||||||
"fm %x %x %x\r", /* fill (start len val) */
|
rom68k_cmds.fill = "fm %x %x %x\r";
|
||||||
{
|
rom68k_cmds.setmem.cmdb = "pm %x %x\r";
|
||||||
"pm %x %x\r", /* setmem.cmdb (addr, value) */
|
rom68k_cmds.setmem.cmdw = "pm;w %x %x\r";
|
||||||
"pm.w %x %x\r", /* setmem.cmdw (addr, value) */
|
rom68k_cmds.setmem.cmdl = "pm;l %x %x\r";
|
||||||
"pm.l %x %x\r", /* setmem.cmdl (addr, value) */
|
rom68k_cmds.setmem.cmdll = NULL;
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
rom68k_cmds.setmem.resp_delim = NULL;
|
||||||
NULL, /* setreg.resp_delim */
|
rom68k_cmds.setmem.term = NULL;
|
||||||
NULL, /* setreg.term */
|
rom68k_cmds.setmem.term_cmd = NULL;
|
||||||
NULL, /* setreg.term_cmd */
|
rom68k_cmds.getmem.cmdb = "dm %x %x\r";
|
||||||
},
|
rom68k_cmds.getmem.cmdw = "dm;w %x %x\r";
|
||||||
{
|
rom68k_cmds.getmem.cmdl = "dm;l %x %x\r";
|
||||||
"dm %x %x\r", /* getmem.cmdb (addr, len) */
|
rom68k_cmds.getmem.cmdll = NULL;
|
||||||
"dm.w %x %x\r", /* getmem.cmdw (addr, len) */
|
rom68k_cmds.getmem.resp_delim = " ";
|
||||||
"dm.l %x %x\r", /* getmem.cmdl (addr, len) */
|
rom68k_cmds.getmem.term = NULL;
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
rom68k_cmds.getmem.term_cmd = NULL;
|
||||||
" ", /* getmem.resp_delim */
|
rom68k_cmds.setreg.cmd = "pr %s %x\r";
|
||||||
NULL, /* getmem.term */
|
rom68k_cmds.setreg.resp_delim = NULL;
|
||||||
NULL, /* getmem.term_cmd */
|
rom68k_cmds.setreg.term = NULL;
|
||||||
},
|
rom68k_cmds.setreg.term_cmd = NULL ;
|
||||||
{
|
rom68k_cmds.getreg.cmd = "pr %s\r" ;
|
||||||
"pr %s %x\r", /* setreg.cmd (name, value) */
|
rom68k_cmds.getreg.resp_delim = ": " ;
|
||||||
NULL, /* setreg.resp_delim */
|
rom68k_cmds.getreg.term = "= " ;
|
||||||
NULL, /* setreg.term */
|
rom68k_cmds.getreg.term_cmd = ";\r" ;
|
||||||
NULL /* setreg.term_cmd */
|
rom68k_cmds.dump_registers = "dr\r" ;
|
||||||
},
|
rom68k_cmds.register_pattern =
|
||||||
{
|
"\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)" ;
|
||||||
"pr %s\r", /* getreg.cmd (name) */
|
rom68k_cmds.supply_register = rom68k_supply_register;
|
||||||
": ", /* getreg.resp_delim */
|
rom68k_cmds.load_routine = NULL;
|
||||||
"= ", /* getreg.term */
|
rom68k_cmds.load = "dc\r";
|
||||||
".\r" /* getreg.term_cmd */
|
rom68k_cmds.loadresp = "Waiting for S-records from host;.. ";
|
||||||
},
|
rom68k_cmds.prompt = "ROM68K :-> ";
|
||||||
"dr\r", /* dump_registers */
|
rom68k_cmds.line_term = "\r";
|
||||||
/* register_pattern */
|
rom68k_cmds.cmd_end = ";\r";
|
||||||
"\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)",
|
rom68k_cmds.target = &rom68k_ops;
|
||||||
rom68k_supply_register, /* supply_register */
|
rom68k_cmds.stopbits = SERIAL_1_STOPBITS;
|
||||||
NULL, /* load_routine (defaults to SRECs) */
|
rom68k_cmds.regnames = rom68k_regnames;
|
||||||
"dc\r", /* download command */
|
rom68k_cmds.magic = MONITOR_OPS_MAGIC ;
|
||||||
"Waiting for S-records from host... ", /* Load response */
|
} /* init_rom68k_cmds */
|
||||||
"ROM68K :-> ", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-line terminator */
|
|
||||||
".\r", /* optional command terminator */
|
|
||||||
&rom68k_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
rom68k_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
rom68k_open (args, from_tty)
|
rom68k_open (args, from_tty)
|
||||||
|
@ -161,6 +154,7 @@ rom68k_open (args, from_tty)
|
||||||
void
|
void
|
||||||
_initialize_rom68k ()
|
_initialize_rom68k ()
|
||||||
{
|
{
|
||||||
|
init_rom_68k_cmds() ;
|
||||||
init_monitor_ops (&rom68k_ops);
|
init_monitor_ops (&rom68k_ops);
|
||||||
|
|
||||||
rom68k_ops.to_shortname = "rom68k";
|
rom68k_ops.to_shortname = "rom68k";
|
||||||
|
|
104
gdb/sh3-rom.c
104
gdb/sh3-rom.c
|
@ -183,63 +183,54 @@ static struct target_ops sh3_ops, sh3e_ops;
|
||||||
|
|
||||||
static char *sh3_inits[] = {"\003", NULL}; /* Exits sub-command mode & download cmds */
|
static char *sh3_inits[] = {"\003", NULL}; /* Exits sub-command mode & download cmds */
|
||||||
|
|
||||||
static struct monitor_ops sh3_cmds =
|
static struct monitor_ops sh3_cmds ;
|
||||||
|
static void init_sh3_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR
|
sh3_cmds.flags = MO_CLR_BREAK_USES_ADDR | MO_GETMEM_READ_SINGLE ; /* flags */
|
||||||
| MO_GETMEM_READ_SINGLE, /* flags */
|
sh3_cmds.init = sh3_inits; /* monitor init string */
|
||||||
sh3_inits, /* monitor init string */
|
sh3_cmds.cont = "g\r"; /* continue command */
|
||||||
"g\r", /* continue command */
|
sh3_cmds.step = "s\r"; /* single step */
|
||||||
"s\r", /* single step */
|
sh3_cmds.stop = "\003"; /* Interrupt program */
|
||||||
"\003", /* Interrupt program */
|
sh3_cmds.set_break = "b %x\r"; /* set a breakpoint */
|
||||||
"b %x\r", /* set a breakpoint */
|
sh3_cmds.clr_break = "b -%x\r"; /* clear a breakpoint */
|
||||||
"b -%x\r", /* clear a breakpoint */
|
sh3_cmds.clr_all_break = "b -\r"; /* clear all breakpoints */
|
||||||
"b -\r", /* clear all breakpoints */
|
sh3_cmds.fill = "f %x @%x %x\r"; /* fill (start len val) */
|
||||||
"f %x @%x %x\r", /* fill (start len val) */
|
sh3_cmds.setmem.cmdb = "m %x %x\r"; /* setmem.cmdb (addr, value) */
|
||||||
{
|
sh3_cmds.setmem.cmdw = "m %x %x;w\r"; /* setmem.cmdw (addr, value) */
|
||||||
"m %x %x\r", /* setmem.cmdb (addr, value) */
|
sh3_cmds.setmem.cmdl = "m %x %x;l\r"; /* setmem.cmdl (addr, value) */
|
||||||
"m %x %x;w\r", /* setmem.cmdw (addr, value) */
|
sh3_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
"m %x %x;l\r", /* setmem.cmdl (addr, value) */
|
sh3_cmds.setmem.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
sh3_cmds.setmem.term = NULL; /* setreg.term */
|
||||||
NULL, /* setreg.resp_delim */
|
sh3_cmds.setmem.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
NULL, /* setreg.term */
|
sh3_cmds.getmem.cmdb = "m %x\r"; /* getmem.cmdb (addr, len) */
|
||||||
NULL, /* setreg.term_cmd */
|
sh3_cmds.getmem.cmdw = "m %x;w\r"; /* getmem.cmdw (addr, len) */
|
||||||
},
|
sh3_cmds.getmem.cmdl = "m %x;l\r"; /* getmem.cmdl (addr, len) */
|
||||||
{
|
sh3_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, len) */
|
||||||
"m %x\r", /* getmem.cmdb (addr, len) */
|
sh3_cmds.getmem.resp_delim = "^ [0-9A-F]+ "; /* getmem.resp_delim */
|
||||||
"m %x;w\r", /* getmem.cmdw (addr, len) */
|
sh3_cmds.getmem.term = "? "; /* getmem.term */
|
||||||
"m %x;l\r", /* getmem.cmdl (addr, len) */
|
sh3_cmds.getmem.term_cmd = ".\r"; /* getmem.term_cmd */
|
||||||
NULL, /* getmem.cmdll (addr, len) */
|
sh3_cmds.setreg.cmd = ".%s %x\r"; /* setreg.cmd (name, value) */
|
||||||
"^ [0-9A-F]+ ", /* getmem.resp_delim */
|
sh3_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
"? ", /* getmem.term */
|
sh3_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
".\r", /* getmem.term_cmd */
|
sh3_cmds.setreg.term_cmd = NULL; /* setreg.term_cmd */
|
||||||
},
|
sh3_cmds.getreg.cmd = ".%s\r"; /* getreg.cmd (name) */
|
||||||
{
|
sh3_cmds.getreg.resp_delim = "="; /* getreg.resp_delim */
|
||||||
".%s %x\r", /* setreg.cmd (name, value) */
|
sh3_cmds.getreg.term = "? "; /* getreg.term */
|
||||||
NULL, /* setreg.resp_delim */
|
sh3_cmds.getreg.term_cmd = ".\r" ; /* getreg.term_cmd */
|
||||||
NULL, /* setreg.term */
|
sh3_cmds.dump_registers = "r\r"; /* dump_registers */
|
||||||
NULL /* setreg.term_cmd */
|
sh3_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)";
|
||||||
},
|
sh3_cmds.supply_register = sh3_supply_register ; /* supply_register */
|
||||||
{
|
sh3_cmds.load_routine = sh3_load; /* load_routine */
|
||||||
".%s\r", /* getreg.cmd (name) */
|
sh3_cmds.load = NULL; /* download command */
|
||||||
"=", /* getreg.resp_delim */
|
sh3_cmds.loadresp = NULL; /* Load response */
|
||||||
"? ", /* getreg.term */
|
sh3_cmds.prompt = "\n:"; /* monitor command prompt */
|
||||||
".\r" /* getreg.term_cmd */
|
sh3_cmds.line_term = "\r"; /* end-of-line terminator */
|
||||||
},
|
sh3_cmds.cmd_end = ".\r"; /* optional command terminator */
|
||||||
"r\r", /* dump_registers */
|
sh3_cmds.target = &sh3_ops; /* target operations */
|
||||||
/* register_pattern */
|
sh3_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
"\\(\\w+\\)=\\([0-9a-fA-F]+\\( +[0-9a-fA-F]+\\b\\)*\\)",
|
sh3_cmds.regnames = sh3_regnames; /* registers names */
|
||||||
sh3_supply_register, /* supply_register */
|
sh3_cmds.magic = MONITOR_OPS_MAGIC ; /* magic */
|
||||||
sh3_load, /* load_routine */
|
} /* init_sh3_cmds */
|
||||||
NULL, /* download command */
|
|
||||||
NULL, /* Load response */
|
|
||||||
"\n:", /* monitor command prompt */
|
|
||||||
"\r", /* end-of-line terminator */
|
|
||||||
".\r", /* optional command terminator */
|
|
||||||
&sh3_ops, /* target operations */
|
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
|
||||||
sh3_regnames, /* registers names */
|
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
|
||||||
};
|
|
||||||
|
|
||||||
/* This monitor structure is identical except for a couple slots, so
|
/* This monitor structure is identical except for a couple slots, so
|
||||||
we will fill it in from the base structure when needed. */
|
we will fill it in from the base structure when needed. */
|
||||||
|
@ -350,6 +341,7 @@ sh3_close (quitting)
|
||||||
void
|
void
|
||||||
_initialize_sh3_rom ()
|
_initialize_sh3_rom ()
|
||||||
{
|
{
|
||||||
|
init_sh3_cmds() ;
|
||||||
init_monitor_ops (&sh3_ops);
|
init_monitor_ops (&sh3_ops);
|
||||||
|
|
||||||
sh3_ops.to_shortname = "sh3";
|
sh3_ops.to_shortname = "sh3";
|
||||||
|
|
|
@ -194,73 +194,66 @@ sparclet_load (desc, file, hashmark)
|
||||||
|
|
||||||
static char *sparclet_inits[] = {"\n\r\r\n", NULL};
|
static char *sparclet_inits[] = {"\n\r\r\n", NULL};
|
||||||
|
|
||||||
static struct monitor_ops sparclet_cmds =
|
static struct monitor_ops sparclet_cmds ;
|
||||||
|
static void init_sparclet_cmds(void)
|
||||||
{
|
{
|
||||||
MO_CLR_BREAK_USES_ADDR |
|
sparclet_cmds.flags = MO_CLR_BREAK_USES_ADDR |
|
||||||
MO_HEX_PREFIX |
|
MO_HEX_PREFIX |
|
||||||
MO_NO_ECHO_ON_OPEN |
|
MO_NO_ECHO_ON_OPEN |
|
||||||
MO_NO_ECHO_ON_SETMEM |
|
MO_NO_ECHO_ON_SETMEM |
|
||||||
MO_RUN_FIRST_TIME |
|
MO_RUN_FIRST_TIME |
|
||||||
MO_GETMEM_READ_SINGLE, /* flags */
|
MO_GETMEM_READ_SINGLE ; /* flags */
|
||||||
sparclet_inits, /* Init strings */
|
sparclet_cmds.init = sparclet_inits; /* Init strings */
|
||||||
"cont\r", /* continue command */
|
sparclet_cmds.cont = "cont\r"; /* continue command */
|
||||||
"step\r", /* single step */
|
sparclet_cmds.step = "step\r"; /* single step */
|
||||||
"\r", /* break interrupts the program */
|
sparclet_cmds.stop = "\r"; /* break interrupts the program */
|
||||||
"+bp %x\r", /* set a breakpoint */
|
sparclet_cmds.set_break = "+bp %x\r"; /* set a breakpoint */
|
||||||
/* can't use "br" because only 2 hw bps are supported */
|
sparclet_cmds.clr_break = "-bp %x\r" ; /* can't use "br" because only 2 hw bps are supported */
|
||||||
"-bp %x\r", /* clear a breakpoint */
|
sparclet_cmds.clr_all_break = "-bp %x\r"; /* clear a breakpoint */
|
||||||
"-bp\r", /* clear all breakpoints */
|
"-bp\r" ; /* clear all breakpoints */
|
||||||
"fill %x -n %x -v %x -b\r", /* fill (start length val) */
|
sparclet_cmds.fill = "fill %x -n %x -v %x -b\r"; /* fill (start length val) */
|
||||||
/* can't use "fi" because it takes words, not bytes */
|
/* can't use "fi" because it takes words, not bytes */
|
||||||
{
|
/* ex [addr] [-n count] [-b|-s|-l] default: ex cur -n 1 -b */
|
||||||
/* ex [addr] [-n count] [-b|-s|-l] default: ex cur -n 1 -b */
|
sparclet_cmds.setmem.cmdb = "ex %x -b\r%x\rq\r"; /* setmem.cmdb (addr, value) */
|
||||||
"ex %x -b\r%x\rq\r", /* setmem.cmdb (addr, value) */
|
sparclet_cmds.setmem.cmdw = "ex %x -s\r%x\rq\r"; /* setmem.cmdw (addr, value) */
|
||||||
"ex %x -s\r%x\rq\r", /* setmem.cmdw (addr, value) */
|
sparclet_cmds.setmem.cmdl = "ex %x -l\r%x\rq\r"; /* setmem.cmdl (addr, value) */
|
||||||
"ex %x -l\r%x\rq\r", /* setmem.cmdl (addr, value) */
|
sparclet_cmds.setmem.cmdll = NULL; /* setmem.cmdll (addr, value) */
|
||||||
NULL, /* setmem.cmdll (addr, value) */
|
sparclet_cmds.setmem.resp_delim = NULL; /*": " */ /* setmem.resp_delim */
|
||||||
NULL, /*": " */ /* setmem.resp_delim */
|
sparclet_cmds.setmem.term = NULL; /*"? " */ /* setmem.term */
|
||||||
NULL, /*"? " */ /* setmem.term */
|
sparclet_cmds.setmem.term_cmd = NULL; /*"q\r" */ /* setmem.term_cmd */
|
||||||
NULL, /*"q\r" */ /* setmem.term_cmd */
|
/* since the parsing of multiple bytes is difficult due to
|
||||||
},
|
interspersed addresses, we'll only read 1 value at a time,
|
||||||
{
|
even tho these can handle a count */
|
||||||
/* since the parsing of multiple bytes is difficult due to
|
/* we can use -n to set count to read, but may have to parse? */
|
||||||
interspersed addresses, we'll only read 1 value at a time,
|
sparclet_cmds.getmem.cmdb = "ex %x -n 1 -b\r"; /* getmem.cmdb (addr, #bytes) */
|
||||||
even tho these can handle a count */
|
sparclet_cmds.getmem.cmdw = "ex %x -n 1 -s\r"; /* getmem.cmdw (addr, #swords) */
|
||||||
/* we can use -n to set count to read, but may have to parse? */
|
sparclet_cmds.getmem.cmdl = "ex %x -n 1 -l\r"; /* getmem.cmdl (addr, #words) */
|
||||||
"ex %x -n 1 -b\r", /* getmem.cmdb (addr, #bytes) */
|
sparclet_cmds.getmem.cmdll = NULL; /* getmem.cmdll (addr, #dwords) */
|
||||||
"ex %x -n 1 -s\r", /* getmem.cmdw (addr, #swords) */
|
sparclet_cmds.getmem.resp_delim = ": "; /* getmem.resp_delim */
|
||||||
"ex %x -n 1 -l\r", /* getmem.cmdl (addr, #words) */
|
sparclet_cmds.getmem.term = NULL; /* getmem.term */
|
||||||
NULL, /* getmem.cmdll (addr, #dwords) */
|
sparclet_cmds.getmem.term_cmd = NULL; /* getmem.term_cmd */
|
||||||
": ", /* getmem.resp_delim */
|
sparclet_cmds.setreg.cmd = "reg %s 0x%x\r"; /* setreg.cmd (name, value) */
|
||||||
NULL, /* getmem.term */
|
sparclet_cmds.setreg.resp_delim = NULL; /* setreg.resp_delim */
|
||||||
NULL, /* getmem.term_cmd */
|
sparclet_cmds.setreg.term = NULL; /* setreg.term */
|
||||||
},
|
sparclet_cmds.setreg.term_cmd = NULL ; /* setreg.term_cmd */
|
||||||
{
|
sparclet_cmds.getreg.cmd = "reg %s\r"; /* getreg.cmd (name) */
|
||||||
"reg %s 0x%x\r", /* setreg.cmd (name, value) */
|
sparclet_cmds.getreg.resp_delim = " "; /* getreg.resp_delim */
|
||||||
NULL, /* setreg.resp_delim */
|
sparclet_cmds.getreg.term = NULL; /* getreg.term */
|
||||||
NULL, /* setreg.term */
|
sparclet_cmds.getreg.term_cmd = NULL; /* getreg.term_cmd */
|
||||||
NULL /* setreg.term_cmd */
|
sparclet_cmds.dump_registers = "reg\r"; /* dump_registers */
|
||||||
},
|
sparclet_cmds.register_pattern = "\\(\\w+\\)=\\([0-9a-fA-F]+\\)"; /* register_pattern */
|
||||||
{
|
sparclet_cmds.supply_register = sparclet_supply_register; /* supply_register */
|
||||||
"reg %s\r", /* getreg.cmd (name) */
|
sparclet_cmds.load_routine = sparclet_load; /* load_routine */
|
||||||
" ", /* getreg.resp_delim */
|
sparclet_cmds.load = NULL; /* download command (srecs on console) */
|
||||||
NULL, /* getreg.term */
|
sparclet_cmds.loadresp = NULL; /* load response */
|
||||||
NULL, /* getreg.term_cmd */
|
sparclet_cmds.prompt = "monitor>"; /* monitor command prompt */
|
||||||
},
|
|
||||||
"reg\r", /* dump_registers */
|
|
||||||
"\\(\\w+\\)=\\([0-9a-fA-F]+\\)", /* register_pattern */
|
|
||||||
sparclet_supply_register, /* supply_register */
|
|
||||||
sparclet_load, /* load_routine */
|
|
||||||
NULL, /* download command (srecs on console) */
|
|
||||||
NULL, /* load response */
|
|
||||||
"monitor>", /* monitor command prompt */
|
|
||||||
/* yikes! gdb core dumps without this delimitor!! */
|
/* yikes! gdb core dumps without this delimitor!! */
|
||||||
"\r", /* end-of-command delimitor */
|
sparclet_cmds.line_term = "\r"; /* end-of-command delimitor */
|
||||||
NULL, /* optional command terminator */
|
sparclet_cmds.cmd_end = NULL; /* optional command terminator */
|
||||||
&sparclet_ops, /* target operations */
|
sparclet_cmds.target = &sparclet_ops; /* target operations */
|
||||||
SERIAL_1_STOPBITS, /* number of stop bits */
|
sparclet_cmds.stopbits = SERIAL_1_STOPBITS; /* number of stop bits */
|
||||||
sparclet_regnames, /* registers names */
|
sparclet_cmds.regnames = sparclet_regnames; /* registers names */
|
||||||
MONITOR_OPS_MAGIC /* magic */
|
sparclet_cmds.magic = MONITOR_OPS_MAGIC ; /* magic */
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -275,6 +268,7 @@ void
|
||||||
_initialize_sparclet ()
|
_initialize_sparclet ()
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
init_sparclet_cmds() ;
|
||||||
|
|
||||||
for (i = 0; i < NUM_REGS; i++)
|
for (i = 0; i < NUM_REGS; i++)
|
||||||
if (sparclet_regnames[i][0] == 'c' ||
|
if (sparclet_regnames[i][0] == 'c' ||
|
||||||
|
|
Loading…
Add table
Reference in a new issue