[PATCHv4 00/10] thread-specific breakpoints in just some inferiors

Andrew Burgess via Gdb-patches
2023-08-23T15:59:46Z

This series makes it so that GDB will only insert thread-specific and
inferior-specific breakpoints into the program space in which the
thread or inferior is running.

This means that threads or inferiors running in different program
spaces will no longer hit these breakpoints at all.

Earlier versions of this series only handled thread-specific
breakpoints as the inferior-specific breakpoint support had not been
merged. In v4 this is no longer the case and both types of breakpoint
are now handled.

---

In v4:

- Big update, this series now handles thread-specific and
inferior-specific breakpoints.

In v3:

- Rebased on to current upstream/master, this includes all Simon's
recent breakpoint changes. Retested with no regressions seen.

In v2:

- Rebased on current upstream/master and retested,

- No changes to code or docs.

---

Andrew Burgess (10):
gdb: create_breakpoint: add asserts and additional comments
gdb: create_breakpoint: asserts relating to extra_string/parse_extra
gdb: change 'if' to gdb_assert in update_dprintf_command_list
gdb: build dprintf commands just once in code_breakpoint constructor
gdb: don't display inferior list for pending breakpoints
gdb: parse pending breakpoint thread/task immediately
gdb: don't set breakpoint::pspace for in create_breakpoint
gdb: remove breakpoint_re_set_one
gdb: remove tracepoint_probe_create_sals_from_location_spec
gdb: only insert thread-specific breakpoints in the relevant inferior

gdb/Makefile.in | 2 +
gdb/NEWS | 11 +
gdb/ada-lang.c | 6 +-
gdb/break-catch-throw.c | 6 +-
gdb/break-cond-parse.c | 425 ++++++++++
gdb/break-cond-parse.h | 49 ++
gdb/breakpoint.c | 759 +++++++++---------
gdb/breakpoint.h | 101 ++-
gdb/testsuite/gdb.ada/tasks.exp | 6 +-
gdb/testsuite/gdb.base/condbreak.exp | 20 +-
gdb/testsuite/gdb.base/pending.exp | 23 +-
gdb/testsuite/gdb.linespec/explicit.exp | 4 +-
gdb/testsuite/gdb.mi/mi-dprintf-pending.exp | 3 +-
gdb/testsuite/gdb.mi/new-ui-bp-deleted.exp | 8 +-
.../gdb.mi/user-selected-context-sync.exp | 4 +-
.../gdb.multi/bp-thread-specific.exp | 7 +-
.../gdb.multi/inferior-specific-bp.exp | 16 +-
.../gdb.multi/multi-target-continue.exp | 2 +-
.../gdb.multi/multi-target-ping-pong-next.exp | 4 +-
.../gdb.multi/pending-bp-del-inferior.c | 28 +
.../gdb.multi/pending-bp-del-inferior.exp | 214 +++++
gdb/testsuite/gdb.multi/pending-bp-lib.c | 22 +
gdb/testsuite/gdb.multi/pending-bp.c | 66 ++
gdb/testsuite/gdb.multi/pending-bp.exp | 336 ++++++++
gdb/testsuite/gdb.multi/tids.exp | 6 +-
.../gdb.threads/del-pending-thread-bp-lib.c | 22 +
.../gdb.threads/del-pending-thread-bp.c | 85 ++
.../gdb.threads/del-pending-thread-bp.exp | 108 +++
28 files changed, 1873 insertions(+), 470 deletions(-)
create mode 100644 gdb/break-cond-parse.c
create mode 100644 gdb/break-cond-parse.h
create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.c
create mode 100644 gdb/testsuite/gdb.multi/pending-bp-del-inferior.exp
create mode 100644 gdb/testsuite/gdb.multi/pending-bp-lib.c
create mode 100644 gdb/testsuite/gdb.multi/pending-bp.c
create mode 100644 gdb/testsuite/gdb.multi/pending-bp.exp
create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp-lib.c
create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.c
create mode 100644 gdb/testsuite/gdb.threads/del-pending-thread-bp.exp

base-commit: cdb090c88b4ebf6f728a000d1ee73d9bdee9ebb3
--
2.25.4