Use do_target_resume when stepping past permanent breakpoint too
authorPedro Alves <palves@redhat.com>
Wed, 1 Apr 2015 14:24:54 +0000 (14:24 +0000)
committerPedro Alves <palves@redhat.com>
Wed, 1 Apr 2015 13:29:05 +0000 (14:29 +0100)
We can use the recently added do_target_resume do simplify the code a
bit here.

Tested on x86_64 Fedora 20.

gdb/ChangeLog:
2015-04-01  Pedro Alves  <palves@redhat.com>

* infrun.c (resume) <step past permanent breakpoint>: Use
do_target_resume.

gdb/ChangeLog
gdb/infrun.c

index 838c685a82889dd8e6436adcb719da35d9584bfd..5353e34d5a5166618e11a64c8dc9b21d89cb28e6 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-01  Pedro Alves  <palves@redhat.com>
+
+       * infrun.c (resume) <step past permanent breakpoint>: Use
+       do_target_resume.
+
 2015-04-01  Pedro Alves  <palves@redhat.com>
 
        * linux-nat.c (linux_handle_extended_wait): Always call set_running.
index 4114246c0d2017767a0ebe2c34465e335520eaa8..d7c250ea45eb8643a21be1ca225277d1d02bc7f3 100644 (file)
@@ -2184,17 +2184,12 @@ resume (enum gdb_signal sig)
                 thread advanced also" branch to be taken.  IOW, we
                 don't want this thread to step further from PC
                 (overstep).  */
+             gdb_assert (!step_over_info_valid_p ());
              insert_single_step_breakpoint (gdbarch, aspace, pc);
              insert_breakpoints ();
 
-             tp->suspend.stop_signal = GDB_SIGNAL_0;
-             /* We're continuing with all breakpoints inserted.  It's
-                safe to let the target bypass signals.  */
-             target_pass_signals ((int) GDB_SIGNAL_LAST, signal_pass);
-             /* ... and safe to let other threads run, according to
-                schedlock.  */
              resume_ptid = user_visible_resume_ptid (user_step);
-             target_resume (resume_ptid, 0, GDB_SIGNAL_0);
+             do_target_resume (resume_ptid, 0, GDB_SIGNAL_0);
              discard_cleanups (old_cleanups);
              return;
            }