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.
This commit is contained in:
parent
a78a19b152
commit
b25e22fd16
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue