aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/interp.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-27 06:48:20 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-27 06:48:20 +0000
commit2f2e6c5d5bf76a01caa0d2da27ac21e45ee2276e (patch)
treee423d11adc8c988ab292d78c6e7a592064ac5ead /sim/mips/interp.c
parentd82e4bf6cc9f6dfb853b2c9fa138b3640381fdf6 (diff)
downloadgdb-2f2e6c5d5bf76a01caa0d2da27ac21e45ee2276e.zip
gdb-2f2e6c5d5bf76a01caa0d2da27ac21e45ee2276e.tar.gz
gdb-2f2e6c5d5bf76a01caa0d2da27ac21e45ee2276e.tar.bz2
Extend xor-endian and per-cpu support in core module.
Allow negated test when watching value within core.
Diffstat (limited to 'sim/mips/interp.c')
-rw-r--r--sim/mips/interp.c62
1 files changed, 34 insertions, 28 deletions
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index e3ea529..b047aca 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1475,40 +1475,46 @@ sim_do_command (sd,cmd)
/* NOTE: Accessed from the GDB "sim" commmand: */
for (cptr = sim_commands; cptr && cptr->name; cptr++)
- if (strncmp(cmd,cptr->name,strlen(cptr->name)) == 0) {
- cmd += strlen(cptr->name);
- switch (cptr->id) {
- case e_help: /* no arguments */
- { /* no arguments */
- struct t_sim_command *lptr;
- callback->printf_filtered(callback,"List of MIPS simulator commands:\n");
- for (lptr = sim_commands; lptr->name; lptr++)
- callback->printf_filtered(callback,"%s %s\n",lptr->name,lptr->help);
- }
+ if (strncmp (cmd, cptr->name, strlen(cptr->name)) == 0)
+ {
+ cmd += strlen(cptr->name);
+ switch (cptr->id) {
+ case e_help: /* no arguments */
+ { /* no arguments */
+ struct t_sim_command *lptr;
+ callback->printf_filtered(callback,"List of MIPS simulator commands:\n");
+ for (lptr = sim_commands; lptr->name; lptr++)
+ callback->printf_filtered(callback,"%s %s\n",lptr->name,lptr->help);
+ sim_args_command (sd, "help");
+ }
break;
- case e_setmemsize: /* memory size argument */
- {
- unsigned int newsize = (unsigned int)getnum(cmd);
- sim_size(newsize);
- }
+ case e_setmemsize: /* memory size argument */
+ {
+ unsigned int newsize = (unsigned int)getnum(cmd);
+ sim_size(newsize);
+ }
break;
- case e_reset: /* no arguments */
- ColdReset();
- /* NOTE: See the comments in sim_open() relating to device
- initialisation. */
- break;
+ case e_reset: /* no arguments */
+ ColdReset();
+ /* NOTE: See the comments in sim_open() relating to device
+ initialisation. */
+ break;
- default:
- callback->printf_filtered(callback,"FATAL: Matched \"%s\", but failed to match command id %d.\n",cmd,cptr->id);
- break;
- }
- break;
- }
+ default:
+ callback->printf_filtered(callback,"FATAL: Matched \"%s\", but failed to match command id %d.\n",cmd,cptr->id);
+ break;
+ }
+ break;
+ }
if (!(cptr->name))
- callback->printf_filtered(callback,"Error: \"%s\" is not a valid MIPS simulator command.\n",cmd);
+ {
+ /* try for a common command when the sim specific lookup fails */
+ if (sim_args_command (sd, cmd) != SIM_RC_OK)
+ callback->printf_filtered(callback,"Error: \"%s\" is not a valid MIPS simulator command.\n",cmd);
+ }
return;
}
@@ -3887,7 +3893,7 @@ Convert(rm,op,from,to)
/*-- co-processor support routines ------------------------------------------*/
-static int
+static int UNUSED
CoProcPresent(coproc_number)
unsigned int coproc_number;
{