aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-05-30 17:37:50 +0000
committerTom Tromey <tromey@redhat.com>2013-05-30 17:37:50 +0000
commit77f9e713027d32cc5ca1fb8d05e7b1b3f5397ec7 (patch)
treed3d3cebdf3cbfd0859c683e4d5702d23f0fd9fbe /gdb
parent45475de718b57eb446a47b773658729b24da1583 (diff)
downloadgdb-77f9e713027d32cc5ca1fb8d05e7b1b3f5397ec7.zip
gdb-77f9e713027d32cc5ca1fb8d05e7b1b3f5397ec7.tar.gz
gdb-77f9e713027d32cc5ca1fb8d05e7b1b3f5397ec7.tar.bz2
some fixes to infrun.c
This fixes some of the problems in infrun.c that the checker reported. I filed the remaining problems as bugs. This patch is purely stylistic. * infrun.c (adjust_pc_after_break): Introduce an outer null cleanup.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 620af90..7adba77 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2013-05-30 Tom Tromey <tromey@redhat.com>
+ * infrun.c (adjust_pc_after_break): Introduce an outer null
+ cleanup.
+
+2013-05-30 Tom Tromey <tromey@redhat.com>
+
* mi/mi-cmd-var.c (varobj_update_one): Add an outer null cleanup.
2013-05-30 Tom Tromey <tromey@redhat.com>
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 376a440..151fdd8 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3027,10 +3027,10 @@ adjust_pc_after_break (struct execution_control_state *ecs)
if (software_breakpoint_inserted_here_p (aspace, breakpoint_pc)
|| (non_stop && moribund_breakpoint_here_p (aspace, breakpoint_pc)))
{
- struct cleanup *old_cleanups = NULL;
+ struct cleanup *old_cleanups = make_cleanup (null_cleanup, NULL);
if (RECORD_IS_USED)
- old_cleanups = record_full_gdb_operation_disable_set ();
+ record_full_gdb_operation_disable_set ();
/* When using hardware single-step, a SIGTRAP is reported for both
a completed single-step and a software breakpoint. Need to
@@ -3056,8 +3056,7 @@ adjust_pc_after_break (struct execution_control_state *ecs)
|| ecs->event_thread->prev_pc == breakpoint_pc)
regcache_write_pc (regcache, breakpoint_pc);
- if (RECORD_IS_USED)
- do_cleanups (old_cleanups);
+ do_cleanups (old_cleanups);
}
}