aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2020-06-17 11:56:43 +0100
committerPedro Alves <palves@redhat.com>2020-06-17 11:56:43 +0100
commitb25e22fd1698b600310fc56f01b6005b5a3f6227 (patch)
tree8b78053a001bc4dfcdaa47819f823d18260a57fb /gdb/gdbthread.h
parenta78a19b15254de31c3d38b7e27469aaef0a30e97 (diff)
downloadbinutils-b25e22fd1698b600310fc56f01b6005b5a3f6227.zip
binutils-b25e22fd1698b600310fc56f01b6005b5a3f6227.tar.gz
binutils-b25e22fd1698b600310fc56f01b6005b5a3f6227.tar.bz2
Update thread_control_state::trap_expected comments
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.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h26
1 files changed, 4 insertions, 22 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 717a2ad..710b4c6 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -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