[PATCH v2 0/2] Breakpoint conditions at locations with differing contexts

Tankut Baris Aktemur
2020-08-20T21:24:48Z

Hi,

This is a follow-up of

https://sourceware.org/pipermail/gdb-patches/2020-July/170984.html

which is a short series about conditional breakpoints where the
condition may be invalid at some breakpoint locations because of their
context. Currently, GDB does not allow defining a condition if it's
not valid at all locations. This series aims at bringing more
flexibility: the locations at which the condition expression is
invalid are disabled automatically.

Patch 1/2 is the same as in v1. Patch 2/2 was previously an RFC. Andrew
Burgess commented on it at

https://sourceware.org/pipermail/gdb-patches/2020-August/171012.html

In v2, I extend Patch 2/2 with the '-force-condition' flag for the break
command, add test cases and more documentation. It is no longer an RFC.

Regards.
Baris

Tankut Baris Aktemur (2):
gdb/breakpoint: disable a bp location if condition is invalid at that
location
gdb/breakpoint: add flags to 'condition' and 'break' commands to force
condition

gdb/ada-lang.c | 2 +-
gdb/breakpoint.c | 249 ++++++++++++++----
gdb/breakpoint.h | 12 +-
gdb/doc/gdb.texinfo | 50 ++++
gdb/guile/scm-breakpoint.c | 2 +-
gdb/linespec.c | 18 +-
gdb/python/py-breakpoint.c | 2 +-
.../condbreak-multi-context-included.c | 18 ++
.../gdb.base/condbreak-multi-context.c | 51 ++++
.../gdb.base/condbreak-multi-context.exp | 240 +++++++++++++++++
gdb/testsuite/gdb.linespec/cpcompletion.exp | 12 +-
gdb/testsuite/gdb.linespec/explicit.exp | 1 +
gdb/testsuite/lib/completion-support.exp | 2 +-
13 files changed, 592 insertions(+), 67 deletions(-)
create mode 100644 gdb/testsuite/gdb.base/condbreak-multi-context-included.c
create mode 100644 gdb/testsuite/gdb.base/condbreak-multi-context.c
create mode 100644 gdb/testsuite/gdb.base/condbreak-multi-context.exp

--
2.17.1