aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-10-22 05:26:27 +0000
committerAndrew Cagney <cagney@redhat.com>1997-10-22 05:26:27 +0000
commit9e03a68f136a021e7bfa9afb18ca4f170e949f80 (patch)
tree78c37915fae5528e6e3cba233bbecbd7c368fa39 /sim/h8300
parent2328ef1c9815f27863ca176608f87cd4c2ba3665 (diff)
downloadgdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.zip
gdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.tar.gz
gdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.tar.bz2
Add LMA_P and DO_WRITE arguments to sim/common/sim-load.c:sim_load_file().
Update all simulators. Clarify behavour of sim_load in remote-sim.h
Diffstat (limited to 'sim/h8300')
-rw-r--r--sim/h8300/ChangeLog13
-rw-r--r--sim/h8300/compile.c18
2 files changed, 27 insertions, 4 deletions
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index daefa6e..61ba892 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -1,3 +1,16 @@
+Wed Oct 22 14:43:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * wrapper.c (sim_load): Pass lma_p and sim_write args to
+ sim_load_file.
+
+Fri Oct 3 09:28:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+Wed Sep 24 17:38:57 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
Tue Sep 23 11:04:38 1997 Andrew Cagney <cagney@b1.cygnus.com>
* configure: Regenerated to track ../common/aclocal.m4 changes.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 08dbbcc..12f9d29 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -26,13 +26,19 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
+#endif
#include "wait.h"
#include "ansidecl.h"
#include "bfd.h"
#include "callback.h"
#include "remote-sim.h"
+#ifndef SIGTRAP
+# define SIGTRAP 5
+#endif
+
int debug;
host_callback *sim_callback;
@@ -1269,7 +1275,10 @@ sim_resume (sd, step, siggnal)
goto next;
case O (O_SYSCALL, SB):
- printf ("%c", cpu.regs[2]);
+ {
+ char c = cpu.regs[2];
+ sim_callback->write_stdout (sim_callback, &c, 1);
+ }
goto next;
ONOT (O_NOT, rd = ~rd; v = 0;);
@@ -1714,9 +1723,9 @@ sim_resume (sd, step, siggnal)
;
/* if (cpu.regs[8] ) abort(); */
- if (poll_count++ > 100)
+ if (--poll_count < 0)
{
- poll_count = 0;
+ poll_count = 100;
if ((*sim_callback->poll_quit) != NULL
&& (*sim_callback->poll_quit) (sim_callback))
sim_stop (sd);
@@ -2108,7 +2117,8 @@ sim_load (sd, prog, abfd, from_tty)
cpu.mask = memory_size - 1;
if (sim_load_file (sd, myname, sim_callback, prog, prog_bfd,
- sim_kind == SIM_OPEN_DEBUG)
+ sim_kind == SIM_OPEN_DEBUG,
+ 0, sim_write)
== NULL)
{
/* Close the bfd if we opened it. */