[v7,0/2] gdb: setting BP with multiple locations only displays one location

Message ID 20241029113343.3945855-1-klaus.gerlicher@intel.com
Headers
Series gdb: setting BP with multiple locations only displays one location |

Message

Klaus Gerlicher Oct. 29, 2024, 11:33 a.m. UTC
  From: "Gerlicher, Klaus" <klaus.gerlicher@intel.com>

Hi Andrew, Guinevere, all,

Thanks for all of your feedback on V6.

V6 of this series is here:

https://inbox.sourceware.org/gdb-patches/20240930060102.752079-1-klaus.gerlicher@intel.com/

V7 addresses the following suggestions from Andrew:

For the first patch (20240930060102.752079-2-klaus.gerlicher@intel.com):

- harden tests: matching linespec now when possible. This adds a locspec option
  where required.
- explain gdb_breakpoint option a bit more (regex).
- remove a stale comment
- use -wrap and some fill pattern and correct some wrong regex in
  gdb_test_multiple regexes
- replace [string compare ] with eq/ne comparisons.

For the 2nd patch (20240930060102.752079-3-klaus.gerlicher@intel.com):

- fix NEWS
- move the new setting under breakpoint commands.
- fix some printf format identifiers (%u -> %d)
- fix GNU style issues, I found some more not so obvious ones. Using
  clang-format is sometimes not very helpful.
- fix one explicit nullptr comparison
- fix styled_line oversights.
- add some internationalisation
- add wraps where Andrew suggested. I have no idea how to test these...
- output "in inferior" instead of "on inferior"

Thanks
Klaus

Gerlicher, Klaus (2):
  gdb: extend gdb_breakpoint for multiple locations
  gdb, breakpoint: output multiple bp locations

 gdb/NEWS                                      |   4 +
 gdb/breakpoint.c                              | 135 +++++++++++++----
 gdb/doc/gdb.texinfo                           |  45 +++++-
 gdb/testsuite/gdb.ada/bp_inlined_func.exp     |   4 +-
 gdb/testsuite/gdb.ada/homonym.exp             |   8 +-
 gdb/testsuite/gdb.ada/operator_bp.exp         |  18 +--
 .../gdb.base/condbreak-multi-context.exp      |  22 ++-
 gdb/testsuite/gdb.base/ctxobj.exp             |   4 +-
 gdb/testsuite/gdb.base/dtrace-probe.exp       |   4 +-
 gdb/testsuite/gdb.base/foll-fork.exp          |   7 +-
 gdb/testsuite/gdb.base/msym-bp-shl.exp        |   4 +-
 gdb/testsuite/gdb.base/msym-bp.exp            |   2 +-
 .../run-control-while-bg-execution.exp        |   2 +-
 gdb/testsuite/gdb.base/solib-symbol.exp       |   4 +-
 gdb/testsuite/gdb.base/stap-probe.exp         |   8 +-
 gdb/testsuite/gdb.base/step-over-exit.exp     |   2 +-
 gdb/testsuite/gdb.cp/breakpoint-locs.exp      |   2 +-
 gdb/testsuite/gdb.cp/ena-dis-br-range.exp     |   4 +-
 gdb/testsuite/gdb.cp/mb-ctor.exp              |   8 +-
 gdb/testsuite/gdb.cp/mb-inline.exp            |   8 +-
 gdb/testsuite/gdb.cp/mb-templates.exp         |  13 +-
 gdb/testsuite/gdb.cp/meth-typedefs.exp        |   2 +-
 gdb/testsuite/gdb.cp/ovldbreak.exp            |  10 +-
 gdb/testsuite/gdb.cp/paramless.exp            |   4 +-
 gdb/testsuite/gdb.cp/templates.exp            |  22 +--
 gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp |  20 +--
 .../gdb.dwarf2/dw2-skip-prologue.exp          |   2 +-
 gdb/testsuite/gdb.linespec/break-asm-file.exp |   4 +-
 gdb/testsuite/gdb.linespec/cpcompletion.exp   |   2 +
 gdb/testsuite/gdb.linespec/linespec.exp       |  22 +--
 gdb/testsuite/gdb.linespec/multiple-locs.cc   |  41 +++++
 gdb/testsuite/gdb.linespec/multiple-locs.exp  |  57 +++++++
 .../mi-breakpoint-multiple-locations.exp      |   4 +-
 .../gdb.mi/user-selected-context-sync.exp     |  16 +-
 .../gdb.multi/bp-thread-specific.exp          |   6 +-
 .../gdb.multi/inferior-specific-bp.exp        |   3 +-
 .../gdb.multi/multi-target-continue.exp       |   3 +-
 .../gdb.multi/multi-target-ping-pong-next.exp |   6 +-
 gdb/testsuite/gdb.opt/inline-break.exp        |  23 ++-
 gdb/testsuite/gdb.python/py-bp-locations.exp  |   2 +-
 gdb/testsuite/gdb.python/py-breakpoint.exp    |   3 +-
 gdb/testsuite/lib/completion-support.exp      |   3 +
 gdb/testsuite/lib/gdb.exp                     | 143 +++++++++++++++---
 43 files changed, 480 insertions(+), 226 deletions(-)
 create mode 100644 gdb/testsuite/gdb.linespec/multiple-locs.cc
 create mode 100644 gdb/testsuite/gdb.linespec/multiple-locs.exp