aboutsummaryrefslogtreecommitdiff
path: root/gdb/infrun.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-06-02 00:36:20 +0000
committerMichael Snyder <msnyder@vmware.com>2001-06-02 00:36:20 +0000
commit8601f500c85902a5ea5134cd9de8adf8bcd27c6b (patch)
treea209fbc25af500fb811ff25618eae29b1e789f51 /gdb/infrun.c
parentc6ad9598d052bb904008464632ecb3f81b1c3094 (diff)
downloadgdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.zip
gdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.tar.gz
gdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.tar.bz2
2001-06-01 Michael Snyder <msnyder@redhat.com>
* thread.c (delete_step_resume_breakpoint): New function. Maintain internal consistency of the thread list while deleting a step_resume_breakpoint. * gdbthread.h (delete_step_resume_breakpoint): Export. * breakpoint.c (bpstat_find_step_resume_breakpoint): Make thread-aware: don't return a step_resume_breakpoint for the wrong thread. * infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint instead of delete_breakpoint_current_contents. (fetch_inferior_event): Ditto. (handle_inferior_event): Call delete_step_resume_breakpoint instead of delete_breakpoint.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r--gdb/infrun.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c
index aa93cf5..09cf494 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1277,7 +1277,7 @@ wait_for_inferior (void)
struct execution_control_state ecss;
struct execution_control_state *ecs;
- old_cleanups = make_cleanup (delete_breakpoint_current_contents,
+ old_cleanups = make_cleanup (delete_step_resume_breakpoint,
&step_resume_breakpoint);
make_cleanup (delete_breakpoint_current_contents,
&through_sigtramp_breakpoint);
@@ -1341,7 +1341,7 @@ fetch_inferior_event (void *client_data)
if (!async_ecs->wait_some_more)
{
- old_cleanups = make_exec_cleanup (delete_breakpoint_current_contents,
+ old_cleanups = make_exec_cleanup (delete_step_resume_breakpoint,
&step_resume_breakpoint);
make_exec_cleanup (delete_breakpoint_current_contents,
&through_sigtramp_breakpoint);
@@ -2362,8 +2362,7 @@ handle_inferior_event (struct execution_control_state *ecs)
interferes with us */
if (step_resume_breakpoint != NULL)
{
- delete_breakpoint (step_resume_breakpoint);
- step_resume_breakpoint = NULL;
+ delete_step_resume_breakpoint (&step_resume_breakpoint);
}
/* Not sure whether we need to blow this away too, but probably
it is like the step-resume breakpoint. */
@@ -2461,8 +2460,7 @@ handle_inferior_event (struct execution_control_state *ecs)
step_resume_breakpoint =
bpstat_find_step_resume_breakpoint (stop_bpstat);
}
- delete_breakpoint (step_resume_breakpoint);
- step_resume_breakpoint = NULL;
+ delete_step_resume_breakpoint (&step_resume_breakpoint);
break;
case BPSTAT_WHAT_THROUGH_SIGTRAMP: