[PATCHv8 0/6] disabled_by_cond fixes for breakpoints

Andrew Burgess aburgess@redhat.com
Fri Feb 14 21:04:50 GMT 2025


In v8:

  - Some minor testsuite fixes to patch #5, fixes some failures
    highlighted by Linaro CI.

  - Rebased to current HEAD of master.

In v7:

  - Rebased onto current HEAD of master branch.  Retested, with no
    regressions found.

  - Merged patch #1 (gdb/testsuite: avoid incorrect symbols in
    gdb.base/condbreak-multi-context.cc), this patch was approved back
    on v1.

  - Patch #5 (old patch #6) has been simplified.  Upstream commit
    9da3b735470 means that all of the library is mapped multiple times
    logic is no longer needed.  As a result, this commit is much simpler.

  - Patch #3 (old patch #4) now references bugs 23149 and 20208 as
    suggeted by Tom.

In v6:

  - Rebased on top of upstream commit f1b4718cbdf, this should resolve
    a Linaro CI failure that was reported against v5.  No other
    changes in this commit.

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 (6):
  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                              |  93 ++++---
 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 |  23 ++
 gdb/testsuite/gdb.base/dlmopen.exp            |  48 ++++
 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       | 230 ++++++++++++++++++
 gdb/testsuite/gdb.base/shlib-unload.h         |  26 ++
 gdb/testsuite/gdb.base/shlib-unload.py        |  33 +++
 gdb/testsuite/gdb.trace/change-loc.exp        |   2 +
 15 files changed, 863 insertions(+), 55 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: 9436542558915d5564d05ccb29d1b43a26e37698
-- 
2.47.1



More information about the Gdb-patches mailing list