aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-stub.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-10-04 22:17:36 +0000
committerMichael Snyder <msnyder@vmware.com>2002-10-04 22:17:36 +0000
commitd6020d455dd9fc75ecbe87da82d99ffe05f1dab4 (patch)
treec763807acc098d76e47e26379b4b7c223f848360 /gdb/m32r-stub.c
parent8b0eebb0b03407c3a304222ca63d7a94a7802a1b (diff)
downloadgdb-d6020d455dd9fc75ecbe87da82d99ffe05f1dab4.zip
gdb-d6020d455dd9fc75ecbe87da82d99ffe05f1dab4.tar.gz
gdb-d6020d455dd9fc75ecbe87da82d99ffe05f1dab4.tar.bz2
2002-10-04 Michael Snyder <msnyder@redhat.com>
* m32r-stub.c (handle_exception): Make sure exception is "trap" before treating it as a single-step event.
Diffstat (limited to 'gdb/m32r-stub.c')
-rw-r--r--gdb/m32r-stub.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gdb/m32r-stub.c b/gdb/m32r-stub.c
index a691a65..2e69b44 100644
--- a/gdb/m32r-stub.c
+++ b/gdb/m32r-stub.c
@@ -210,8 +210,16 @@ handle_exception(int exceptionVector)
unsigned char buf[16];
int binary;
- if (!finish_from_step())
- return; /* "false step": let the target continue */
+ /* Do not call finish_from_step() if this is not a trap #1
+ * (breakpoint trap). Without this check, the finish_from_step()
+ * might interpret a system call trap as a single step trap. This
+ * can happen if: the stub receives 's' and exits, but an interrupt
+ * was pending; the interrupt is now handled and causes the stub to
+ * be reentered because some function makes a system call.
+ */
+ if (exceptionVector == 1) /* Trap exception? */
+ if (!finish_from_step()) /* Go see if stepping state needs update. */
+ return; /* "false step": let the target continue */
gdb_m32r_vector = exceptionVector;