* interp.c (sim_hw_configure): Return 1 for success.
authorStephane Carrez <stcarrez@nerim.fr>
Tue, 13 Aug 2002 08:47:18 +0000 (08:47 +0000)
committerStephane Carrez <stcarrez@nerim.fr>
Tue, 13 Aug 2002 08:47:18 +0000 (08:47 +0000)
(sim_prepare_for_program): Use the sim_hw_configure exit code to
return SIM_RC_FAIL.

sim/m68hc11/ChangeLog
sim/m68hc11/interp.c

index 444a0cc5a33964c79f220fac097854cd0db090ab..d6c38630a541f77f26a94fbe3d27fd9bfe373d92 100644 (file)
@@ -1,3 +1,9 @@
+2002-08-13  Marko Kohtala  <marko.kohtala@luukku.com>
+
+       * 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.
+
 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
 
        * dv-m68hc11.c (m68hc11cpu_io_read_buffer): Translate memory
index 1f3b86f6c7d0a487130a917e0391ffb12b388e86..8889da6cc7dfc37dc240a6a198f23f182d1b4f86 100644 (file)
@@ -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);