[PATCHv5,0/7] disabled_by_cond fixes for breakpoints

Message ID cover.1733742925.git.aburgess@redhat.com
Headers
Series disabled_by_cond fixes for breakpoints |

Message

Andrew Burgess Dec. 9, 2024, 11:17 a.m. UTC
  In v5:

  - Rebased onto current HEAD of master.  The new patch #7 now
    actually builds!  No code changes since v4.

In v4:

  - Patches #5 and #7 are new.  Linaro CI showed a regression on
    gdb.base/nostdlib.exp with patch #6.  The new patch #5 fixes this
    issue.

    Then while testing patch #5/#6 I ran into another issue with a
    maintenance command, which patch #7 fixes.

In v3:

  - Rebased onto current HEAD of master.

  - Added some KFAIL for bug PR gdb/32404 in #2 and #3.

  - Retested.

--

I found some small problems with the disabled_by_cond logic for
breakpoints, these are fixed in patch #2.

Writing a test for patch #2 exposed a problem with an existing test
related to disabled_by_cond, though in this case it was the test that
was making some assumptions that turned out to be invalid on my
machine.  By making the test a little stricter the issue can be
avoided.  This is patch #1.

During review of the v1 series Tom pointed me at PR gdb/32079, which
was partially fixed by patch #2.  The final fixes are in patch #6.

And while working on patch #6 I spotted the bugs which are fixed in
patches #3, #4, and #5.

The first patch from the v1 series has been merged as this was a
standalone testsuite improvement.

Thanks,
Andrew

--

Andrew Burgess (7):
  gdb/testsuite: avoid incorrect symbols in
    gdb.base/condbreak-multi-context.cc
  gdb: fixes for code_breakpoint::disabled_by_cond logic
  gdb: restructure disable_breakpoints_in_unloaded_shlib
  gdb: handle dprintf breakpoints when unloading a shared library
  gdb: don't clear inserted flag in
    disable_breakpoints_in_unloaded_shlib
  gdb: disable internal b/p when a solib is unloaded
  gdb: handle empty locspec when printing breakpoints

 gdb/breakpoint.c                              | 118 +++++++--
 gdb/doc/gdb.texinfo                           |   5 +
 gdb/solib.c                                   |   2 +-
 .../gdb.base/bp-disabled-by-cond-lib.c        |  24 ++
 gdb/testsuite/gdb.base/bp-disabled-by-cond.c  |  64 +++++
 .../gdb.base/bp-disabled-by-cond.exp          | 206 ++++++++++++++++
 gdb/testsuite/gdb.base/bp-disabled-by-cond.py |  21 ++
 .../gdb.base/condbreak-multi-context.cc       |   6 +-
 .../gdb.base/condbreak-multi-context.exp      | 231 ++++++++++++------
 gdb/testsuite/gdb.base/dlmopen.exp            |  76 ++++--
 gdb/testsuite/gdb.base/nostdlib.exp           |  69 ++++--
 gdb/testsuite/gdb.base/shlib-unload-lib.c     |  30 +++
 gdb/testsuite/gdb.base/shlib-unload.c         |  63 +++++
 gdb/testsuite/gdb.base/shlib-unload.exp       | 143 +++++++++++
 gdb/testsuite/gdb.base/shlib-unload.h         |  26 ++
 gdb/testsuite/gdb.base/shlib-unload.py        |  31 +++
 gdb/testsuite/gdb.trace/change-loc.exp        |   2 +
 17 files changed, 980 insertions(+), 137 deletions(-)
 create mode 100644 gdb/testsuite/gdb.base/bp-disabled-by-cond-lib.c
 create mode 100644 gdb/testsuite/gdb.base/bp-disabled-by-cond.c
 create mode 100644 gdb/testsuite/gdb.base/bp-disabled-by-cond.exp
 create mode 100644 gdb/testsuite/gdb.base/bp-disabled-by-cond.py
 create mode 100644 gdb/testsuite/gdb.base/shlib-unload-lib.c
 create mode 100644 gdb/testsuite/gdb.base/shlib-unload.c
 create mode 100644 gdb/testsuite/gdb.base/shlib-unload.exp
 create mode 100644 gdb/testsuite/gdb.base/shlib-unload.h
 create mode 100644 gdb/testsuite/gdb.base/shlib-unload.py


base-commit: d9df3857da0cef29ed9c0ef75f90700c5f392986