Add function sim_args_command() which takes a `(gdb) sim <command>' and

parses it using rules found in the simulator command-line-options
databse.
This commit is contained in:
Andrew Cagney
1997-05-08 05:28:20 +00:00
parent 1c877a7aae
commit 43c53e07db
5 changed files with 131 additions and 22 deletions

View File

@@ -1,3 +1,8 @@
Thu May 8 14:07:16 1997 Andrew Cagney <cagney@b1.cygnus.com>
* sim-calls.c (sim_do_command): Implement.
(sim_store_register): Fix typo T2H v H2T.
Wed May 7 11:48:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
* cpu.h (TRACE_FPU2, TRACE_FPU3, TRACE_FPU2I): Add.

View File

@@ -201,7 +201,7 @@ sim_store_register (SIM_DESC sd, int regnr, unsigned char *buf)
else if (regnr == NPC_REGNUM)
STATE_CPU (sd, 0)->cia.dp = T2H_4 (*(unsigned32*)buf);
else if (regnr == A0_REGNUM && regnr <= An_REGNUM)
STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM] = H2T_8 (*(unsigned64*)buf);
STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM] = T2H_8 (*(unsigned64*)buf);
else
sim_io_error (sd, "sim_fetch_register - unknown register nr %d", regnr);
return;
@@ -258,7 +258,8 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
void
sim_do_command (SIM_DESC sd, char *cmd)
{
sim_io_error (sd, "sim_do_command - unimplemented");
if (sim_args_command (sd, cmd) != SIM_RC_OK)
sim_io_eprintf (sd, "Unknown command `%s'\n", cmd);
}