aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2007-12-06 13:47:56 +0000
committerVladimir Prus <vladimir@codesourcery.com>2007-12-06 13:47:56 +0000
commit45e8c884b549f292b89a4c099a5f843745feeaaf (patch)
tree03a33a48ebaaf8bd633f143dff2220dd07c2d290
parentca67fcb81a300f8e2e58246cc64d971514e95d5a (diff)
downloadgdb-45e8c884b549f292b89a4c099a5f843745feeaaf.zip
gdb-45e8c884b549f292b89a4c099a5f843745feeaaf.tar.gz
gdb-45e8c884b549f292b89a4c099a5f843745feeaaf.tar.bz2
Localize infrun use of remove_breakpoints.
* infrun.c (handle_inferior_event): Remove calls to remove_breakpoints, except where needed to communicate change of breakpoint locations to inferior. (keep_going): If steppping over breakpoint, remove breakpoints.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/infrun.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14f5407..739b286 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,4 +1,13 @@
2007-12-06 Vladimir Prus <vladimir@codesourcery.com>
+
+ Localize infrun use of remove_breakpoints.
+ * infrun.c (handle_inferior_event): Remove
+ calls to remove_breakpoints, except where needed to
+ communicate change of breakpoint locations to inferior.
+ (keep_going): If steppping over breakpoint, remove
+ breakpoints.
+
+2007-12-06 Vladimir Prus <vladimir@codesourcery.com>
Clarify infrun variable naming.
* infrun.c (trap_expected): Rename
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 5428a05..9fc79b6 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2146,7 +2146,6 @@ process_event_stop_test:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SET_LONGJMP_RESUME\n");
disable_longjmp_breakpoint ();
- remove_breakpoints ();
if (!gdbarch_get_longjmp_target_p (current_gdbarch)
|| !gdbarch_get_longjmp_target (current_gdbarch,
get_current_frame (), &jmp_buf_pc))
@@ -2171,7 +2170,6 @@ process_event_stop_test:
case BPSTAT_WHAT_CLEAR_LONGJMP_RESUME_SINGLE:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_CLEAR_LONGJMP_RESUME\n");
- remove_breakpoints ();
disable_longjmp_breakpoint ();
ecs->handling_longjmp = 0; /* FIXME */
if (what.main_action == BPSTAT_WHAT_CLEAR_LONGJMP_RESUME)
@@ -2181,7 +2179,6 @@ process_event_stop_test:
case BPSTAT_WHAT_SINGLE:
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: BPSTAT_WHAT_SINGLE\n");
- remove_breakpoints ();
ecs->stepping_over_breakpoint = 1;
/* Still need to check other stuff, at least the case
where we are stepping and step out of the right range. */
@@ -2242,7 +2239,6 @@ process_event_stop_test:
were trying to single-step off a breakpoint. Go back
to doing that. */
ecs->step_after_step_resume_breakpoint = 0;
- remove_breakpoints ();
ecs->stepping_over_breakpoint = 1;
keep_going (ecs);
return;
@@ -2962,7 +2958,11 @@ keep_going (struct execution_control_state *ecs)
already inserted breakpoints. Therefore, we don't
care if breakpoints were already inserted, or not. */
- if (!ecs->stepping_over_breakpoint)
+ if (ecs->stepping_over_breakpoint)
+ {
+ remove_breakpoints ();
+ }
+ else
{
struct gdb_exception e;
/* Stop stepping when inserting breakpoints