aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/sim-calls.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-05-08 05:28:20 +0000
committerAndrew Cagney <cagney@redhat.com>1997-05-08 05:28:20 +0000
commit43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0 (patch)
tree01396e67b23885e0578c685f4b9203fa6389b373 /sim/tic80/sim-calls.c
parent1c877a7aae88483420be05c2a8f5014a228aaaaa (diff)
downloadgdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.zip
gdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.tar.gz
gdb-43c53e07db6bdb75bd0fa4ee0165be0bc76ab9f0.tar.bz2
Add function sim_args_command() which takes a `(gdb) sim <command>' and
parses it using rules found in the simulator command-line-options databse.
Diffstat (limited to 'sim/tic80/sim-calls.c')
-rw-r--r--sim/tic80/sim-calls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c
index cf8e2e9..23b3860 100644
--- a/sim/tic80/sim-calls.c
+++ b/sim/tic80/sim-calls.c
@@ -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);
}