aboutsummaryrefslogtreecommitdiff
path: root/sim/m68hc11/interp.c
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2002-08-13 08:47:18 +0000
committerStephane Carrez <stcarrez@nerim.fr>2002-08-13 08:47:18 +0000
commit39762100979423101cb7a7c577b573df0b8d44a9 (patch)
tree755c886f080211e8cf765141f7f93bb8e83f685e /sim/m68hc11/interp.c
parentca156d780d6f749d68153f2f2066f8e696103d7e (diff)
downloadgdb-39762100979423101cb7a7c577b573df0b8d44a9.zip
gdb-39762100979423101cb7a7c577b573df0b8d44a9.tar.gz
gdb-39762100979423101cb7a7c577b573df0b8d44a9.tar.bz2
* interp.c (sim_hw_configure): Return 1 for success.
(sim_prepare_for_program): Use the sim_hw_configure exit code to return SIM_RC_FAIL.
Diffstat (limited to 'sim/m68hc11/interp.c')
-rw-r--r--sim/m68hc11/interp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index 1f3b86f..8889da6 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -166,7 +166,7 @@ sim_board_reset (SIM_DESC sd)
cpu_restart (cpu);
}
-int
+static int
sim_hw_configure (SIM_DESC sd)
{
const struct bfd_arch_info *arch;
@@ -291,7 +291,7 @@ sim_hw_configure (SIM_DESC sd)
sim_hw_parse (sd, "/m68hc12 > port-d cpu-write-port /m68hc12");
cpu->hw_cpu = sim_hw_parse (sd, "/m68hc12");
}
- return 0;
+ return 1;
}
static int
@@ -301,7 +301,9 @@ sim_prepare_for_program (SIM_DESC sd, struct _bfd* abfd)
cpu = STATE_CPU (sd, 0);
- sim_hw_configure (sd);
+ if (!sim_hw_configure (sd))
+ return SIM_RC_FAIL;
+
if (abfd != NULL)
{
cpu->cpu_elf_start = bfd_get_start_address (abfd);