aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <xdje42@gmail.com>2014-03-02 16:51:35 -0500
committerDoug Evans <xdje42@gmail.com>2014-03-02 16:51:35 -0500
commitf0407826d9a59aff52341328731a506d93acc5bb (patch)
treeb166332434fd7554dca05427095afc031d5c862c
parent35e6a7111ee1b1f36e29671eb0f1f25c6c8f4c5b (diff)
downloadgdb-f0407826d9a59aff52341328731a506d93acc5bb.zip
gdb-f0407826d9a59aff52341328731a506d93acc5bb.tar.gz
gdb-f0407826d9a59aff52341328731a506d93acc5bb.tar.bz2
* infrun.c (handle_signal_stop): Replace test for
TARGET_WAITKIND_STOPPED with an assert.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c30
2 files changed, 19 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index eb2565e..20a9953 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-03-02 Doug Evans <xdje42@gmail.com>
+ * infrun.c (handle_signal_stop): Replace test for
+ TARGET_WAITKIND_STOPPED with an assert.
+
+2014-03-02 Doug Evans <xdje42@gmail.com>
+
* guile/scm-objfile.c (ofscm_mark_objfile_smob): Fix typo in comment.
2014-03-02 Doug Evans <xdje42@gmail.com>
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 042d5fa..c57c6b3 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3781,22 +3781,20 @@ handle_signal_stop (struct execution_control_state *ecs)
enum stop_kind stop_soon;
int random_signal;
- if (ecs->ws.kind == TARGET_WAITKIND_STOPPED)
- {
- /* Do we need to clean up the state of a thread that has
- completed a displaced single-step? (Doing so usually affects
- the PC, so do it here, before we set stop_pc.) */
- displaced_step_fixup (ecs->ptid,
- ecs->event_thread->suspend.stop_signal);
-
- /* If we either finished a single-step or hit a breakpoint, but
- the user wanted this thread to be stopped, pretend we got a
- SIG0 (generic unsignaled stop). */
-
- if (ecs->event_thread->stop_requested
- && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
- ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
- }
+ gdb_assert (ecs->ws.kind == TARGET_WAITKIND_STOPPED);
+
+ /* Do we need to clean up the state of a thread that has
+ completed a displaced single-step? (Doing so usually affects
+ the PC, so do it here, before we set stop_pc.) */
+ displaced_step_fixup (ecs->ptid,
+ ecs->event_thread->suspend.stop_signal);
+
+ /* If we either finished a single-step or hit a breakpoint, but
+ the user wanted this thread to be stopped, pretend we got a
+ SIG0 (generic unsignaled stop). */
+ if (ecs->event_thread->stop_requested
+ && ecs->event_thread->suspend.stop_signal == GDB_SIGNAL_TRAP)
+ ecs->event_thread->suspend.stop_signal = GDB_SIGNAL_0;
stop_pc = regcache_read_pc (get_thread_regcache (ecs->ptid));