diff options
author | Luis Machado <luisgpm@br.ibm.com> | 2008-07-15 17:25:21 +0000 |
---|---|---|
committer | Luis Machado <luisgpm@br.ibm.com> | 2008-07-15 17:25:21 +0000 |
commit | 8c90c1370d95c5a3e70010dce217f163faea4a4b (patch) | |
tree | ea5fb7e8e1d48a95e2fe30b605e6f0b7e786b9ee /gdb/infrun.c | |
parent | b0a0b9787e4bb82a555a54077f5df26a96e105a7 (diff) | |
download | gdb-8c90c1370d95c5a3e70010dce217f163faea4a4b.zip gdb-8c90c1370d95c5a3e70010dce217f163faea4a4b.tar.gz gdb-8c90c1370d95c5a3e70010dce217f163faea4a4b.tar.bz2 |
* infrun.c (handle_inferior_event): Tag threads as stopped
before inserting breakpoints.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 410c6dd..2f32a82 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -1828,6 +1828,29 @@ handle_inferior_event (struct execution_control_state *ecs) adjust_pc_after_break (ecs); + reinit_frame_cache (); + + /* If it's a new process, add it to the thread database */ + + ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid) + && !ptid_equal (ecs->ptid, minus_one_ptid) + && !in_thread_list (ecs->ptid)); + + if (ecs->ws.kind != TARGET_WAITKIND_EXITED + && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && ecs->new_thread_event) + add_thread (ecs->ptid); + + if (ecs->ws.kind != TARGET_WAITKIND_IGNORE) + { + /* Mark the non-executing threads accordingly. */ + if (!non_stop + || ecs->ws.kind == TARGET_WAITKIND_EXITED + || ecs->ws.kind == TARGET_WAITKIND_SIGNALLED) + set_executing (pid_to_ptid (-1), 0); + else + set_executing (ecs->ptid, 0); + } + switch (infwait_state) { case infwait_thread_hop_state: @@ -1867,29 +1890,6 @@ handle_inferior_event (struct execution_control_state *ecs) } infwait_state = infwait_normal_state; - reinit_frame_cache (); - - /* If it's a new process, add it to the thread database */ - - ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid) - && !ptid_equal (ecs->ptid, minus_one_ptid) - && !in_thread_list (ecs->ptid)); - - if (ecs->ws.kind != TARGET_WAITKIND_EXITED - && ecs->ws.kind != TARGET_WAITKIND_SIGNALLED && ecs->new_thread_event) - add_thread (ecs->ptid); - - if (ecs->ws.kind != TARGET_WAITKIND_IGNORE) - { - /* Mark the non-executing threads accordingly. */ - if (!non_stop - || ecs->ws.kind == TARGET_WAITKIND_EXITED - || ecs->ws.kind == TARGET_WAITKIND_SIGNALLED) - set_executing (pid_to_ptid (-1), 0); - else - set_executing (ecs->ptid, 0); - } - switch (ecs->ws.kind) { case TARGET_WAITKIND_LOADED: |