[PATCH 00/10] Step over thread exit (PR gdb/27338)
Pedro Alves
pedro@palves.net
Fri Jul 2 13:01:44 GMT 2021
GDB doesn't handle correctly the case where a thread steps over a
breakpoint (using either in-line or displaced stepping), and the
executed instruction causes the thread to exit. This series fixes it.
Patch #2 is the core of the fix.
Patch #3 includes new remote protocol bits, and corresponding
documentation changes. There are no documentation changes anywhere
else in the series.
Pedro Alves (7):
displaced step: pass down target_waitstatus instead of gdb_signal
remote+gdbserver: stepped-thread-exited feature
struct resumed_pending_vcont_info -> struct resume_info
remote_target::update_thread_list: Don't delete stepping threads
stop_all_threads: (re-)enable async before waiting for stops
Tweak gdbserver's no-resumed handling
lib/my-syscalls.S: Refactor new SYSCALL macro
Simon Marchi (3):
gdb: clear step over information on thread exit (PR gdb/27338)
Implement stepped-thread-exited feature on native+gdbserver Linux
Testcases for stepping over thread exit syscall (PR gdb/27338)
gdb/NEWS | 5 +
gdb/displaced-stepping.c | 18 +-
gdb/displaced-stepping.h | 2 +-
gdb/doc/gdb.texinfo | 28 ++-
gdb/gdbarch.c | 4 +-
gdb/gdbarch.h | 10 +-
gdb/gdbarch.sh | 6 +-
gdb/infrun.c | 220 ++++++++++++++++--
gdb/linux-nat.c | 41 ++--
gdb/linux-tdep.c | 5 +-
gdb/linux-tdep.h | 2 +-
gdb/remote.c | 146 +++++++-----
gdb/target/target.h | 10 +-
...-over-thread-exit-while-stop-all-threads.c | 77 ++++++
...ver-thread-exit-while-stop-all-threads.exp | 69 ++++++
.../gdb.threads/step-over-thread-exit.c | 52 +++++
.../gdb.threads/step-over-thread-exit.exp | 70 ++++++
gdb/testsuite/lib/my-syscalls.S | 50 ++--
gdb/testsuite/lib/my-syscalls.h | 5 +
gdbserver/linux-low.cc | 44 ++--
gdbserver/linux-low.h | 2 +
gdbserver/server.cc | 28 ++-
gdbserver/target.cc | 6 +
gdbserver/target.h | 7 +
24 files changed, 764 insertions(+), 143 deletions(-)
create mode 100644 gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.c
create mode 100644 gdb/testsuite/gdb.threads/step-over-thread-exit-while-stop-all-threads.exp
create mode 100644 gdb/testsuite/gdb.threads/step-over-thread-exit.c
create mode 100644 gdb/testsuite/gdb.threads/step-over-thread-exit.exp
base-commit: 62194b631d00112bac1f8856d3259d774df4c15e
--
2.26.2
More information about the Gdb-patches
mailing list