Update thread_control_state::trap_expected comments
authorPedro Alves <palves@redhat.com>
Wed, 17 Jun 2020 10:56:43 +0000 (11:56 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 17 Jun 2020 10:56:43 +0000 (11:56 +0100)
The comments describing trap_expected are out of date.  It
predates displaced stepping and non-stop mode ("keep other threads
stopped").  It predates stepping over watchpoints with breakpoints
inserted (keep_going_pass_signal).  Says the variable is cleared
in normal_stop, when it isn't.  This fixes it.

gdb/ChangeLog:
2020-06-17  Pedro Alves  <palves@redhat.com>

* gdbthread.h (thread_control_state) <trap_expected> Update
comments.

gdb/ChangeLog
gdb/gdbthread.h

index f4d9eaa5b4bb95215f39346f085f7f1c94629fb7..a231a09e21abb929ff943e59d2d5a5f51fb7058a 100644 (file)
@@ -1,3 +1,8 @@
+2020-06-17  Pedro Alves  <palves@redhat.com>
+
+       * gdbthread.h (thread_control_state) <trap_expected> Update
+       comments.
+
 2020-06-17  Andrew Burgess  <andrew.burgess@embecosm.com>
 
        * ada-lang.c (ada_lookup_symbol_nonlocal): Rename to
index 717a2ad08c2fce127731081e455b605cd7c56316..710b4c66a65f7eae064490b8d6c2d9f43391b0b4 100644 (file)
@@ -131,28 +131,10 @@ struct thread_control_state
      any inlined frames).  */
   struct frame_id step_stack_frame_id {};
 
-  /* Nonzero if we are presently stepping over a breakpoint.
-
-     If we hit a breakpoint or watchpoint, and then continue, we need
-     to single step the current thread with breakpoints disabled, to
-     avoid hitting the same breakpoint or watchpoint again.  And we
-     should step just a single thread and keep other threads stopped,
-     so that other threads don't miss breakpoints while they are
-     removed.
-
-     So, this variable simultaneously means that we need to single
-     step the current thread, keep other threads stopped, and that
-     breakpoints should be removed while we step.
-
-     This variable is set either:
-     - in proceed, when we resume inferior on user's explicit request
-     - in keep_going, if handle_inferior_event decides we need to
-     step over breakpoint.
-
-     The variable is cleared in normal_stop.  The proceed calls
-     wait_for_inferior, which calls handle_inferior_event in a loop,
-     and until wait_for_inferior exits, this variable is changed only
-     by keep_going.  */
+  /* True if the the thread is presently stepping over a breakpoint or
+     a watchpoint, either with an inline step over or a displaced (out
+     of line) step, and we're now expecting it to report a trap for
+     the finished single step.  */
   int trap_expected = 0;
 
   /* Nonzero if the thread is being proceeded for a "finish" command
This page took 0.047556 seconds and 4 git commands to generate.