[PATCH v3 0/5] Reduce back and forth with target when threads have pending statuses + better handling of 'S' packets

Simon Marchi via Gdb-patches
2021-01-08T04:17:40Z

This series is made of two set of changes. The first 4 patches are the
new version of this series:

https://sourceware.org/pipermail/gdb-patches/2020-December/174271.html

The rationale remains the same.

The main change is in patch 1. Previously, the remote target was only
tracking the resume state in non-stop, now it does it even in all-stop.
This was changed because it is useful for patch 5, which is the new
version of this patch:

https://sourceware.org/pipermail/gdb-patches/2020-December/174277.html

I included patch 5 in this series because it uses the infrastructure
added by patch 1.

I also think that making the remote target track the resume state in all
modes, as opposed to just in non-stop mode, is less confusing in the
long run.

Since patches 3 and 4 may be a bit more controversial and require more
discussions, it would be possible to merge only 1, 2 and 5 and discuss
the others separately. Or even just 1 and 5.

This series is called "v3" because what's now patch 5 was already at v2,
so I thought it was less confusing this way.

Andrew Burgess (1):
gdb: better handling of 'S' packets

Simon Marchi (4):
gdb: make the remote target track its own thread resume state
gdb: remove target_ops::commit_resume implementation in
record-{btrace,full}.c
gdb: move commit_resume to process_stratum_target
gdb: generalize commit_resume, avoid commit-resuming when threads have
pending statuses

gdb/infcmd.c | 8 +
gdb/infrun.c | 126 ++++-
gdb/infrun.h | 41 ++
gdb/linux-nat.c | 5 +
gdb/mi/mi-main.c | 2 +
gdb/process-stratum-target.c | 14 +
gdb/process-stratum-target.h | 38 ++
gdb/record-btrace.c | 11 -
gdb/record-full.c | 20 +-
gdb/remote.c | 431 +++++++++++++-----
gdb/target-delegates.c | 22 -
gdb/target.c | 22 -
gdb/target.h | 20 -
.../gdb.server/stop-reply-no-thread-multi.c | 77 ++++
.../gdb.server/stop-reply-no-thread-multi.exp | 136 ++++++
15 files changed, 740 insertions(+), 233 deletions(-)
create mode 100644 gdb/testsuite/gdb.server/stop-reply-no-thread-multi.c
create mode 100644 gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp

--
2.29.2