]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2003-06-24 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Wed, 2 Jul 2003 19:04:58 +0000 (19:04 +0000)
committerMichael Snyder <msnyder@vmware.com>
Wed, 2 Jul 2003 19:04:58 +0000 (19:04 +0000)
* sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
* compile.c (sim_resume): Use the above to return stop signal.

sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8300/sim-main.h

index cd81e6eed8b694c4b0bd06f5b7331947d6f01bbf..2112ad926823ea0560b2fc63f5542b1ec4898a47 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-24  Michael Snyder  <msnyder@redhat.com>
+
+       * sim-main.h (SIM_WIFSTOPPED, SIM_WSTOPSIG): Define.
+       * compile.c (sim_resume): Use the above to return stop signal.
+
 2003-06-18  Michael Snyder  <msnyder@redhat.com>
 
        * compile.c: Replace "Hitachi" with "Renesas".
index f416695277d40e1cfb43c423b5f426dedc32cbb8..7635655b3e57ac39c6459c9fb073f97367a08d65 100644 (file)
@@ -3575,6 +3575,12 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
              sim_engine_set_run_state (sd, sim_exited, 
                                        SIM_WEXITSTATUS (h8_get_reg (sd, 0)));
            }
+         else if (SIM_WIFSTOPPED (h8_get_reg (sd, 0)))
+           {
+             /* Pass the stop signal up to gdb.  */
+             sim_engine_set_run_state (sd, sim_stopped, 
+                                       SIM_WSTOPSIG (h8_get_reg (sd, 0)));
+           }
          else
            {
              /* Treat it as a sigtrap.  */
index 6acf901d5de0ca8fa9ba53e432778011fd04d049..284a5586d16e6994e6fb0db3162dd40db9aae5da 100644 (file)
@@ -164,7 +164,9 @@ struct sim_state {
 /* Local version of macros for decoding exit status.  
    (included here rather than try to find target version of wait.h)
 */
-#define SIM_WIFEXITED(V) (((V) & 0xff) == 0)
-#define SIM_WEXITSTATUS(V) ((V) >> 8)
+#define SIM_WIFEXITED(V)       (((V) & 0xff) == 0)
+#define SIM_WIFSTOPPED(V)      (!SIM_WIFEXITED (V))
+#define SIM_WEXITSTATUS(V)     (((V) >> 8) & 0xff)
+#define SIM_WSTOPSIG(V)                ((V) & 0x7f)
 
 #endif /* SIM_MAIN_H */