[PATCH 0/3] Don't disable breakpoints in still loaded libraries

Andrew Burgess aburgess@redhat.com
Tue Dec 24 12:05:34 GMT 2024


It is possible, in some cases, that GDB will try to disable
breakpoints within a shared library that is still loaded.  This can
result in the inferior not hitting breakpoints that it should.

Admittedly, this is a bit of an edge case, so no something (m)any
users would actually expect to run into, but fixing this is a
requirement for this patch:

  https://inbox.sourceware.org/gdb-patches/be279bf1532a0bb2b8064a2ae4dfaed74f8c54d3.1734366277.git.aburgess@redhat.com

I attempted to solve this problem within that patch, but the review
feedback raised some good points, so I figured I should break this fix
out into its own mini series.  Once this fix (or something like this)
is merged, I'll rebase the series I linked above.

Patch #1 is a testsuite cleanup.

Patch #2 is the actual fix.

Patch #3 fixes a new problem that I spotted while writing the tests
for the second patch!.

Thanks,
Andrew

---

Andrew Burgess (3):
  gdb/testsuite: restructure gdb.base/dlmopen.exp
  gdb: include a still-mapped flag in solib unload notification
  gdb/mi: include ranges in =library-unloaded event

 gdb/NEWS                                  |  12 ++
 gdb/breakpoint.c                          |  11 +-
 gdb/bsd-uthread.c                         |   5 +-
 gdb/doc/gdb.texinfo                       |  20 +-
 gdb/interps.c                             |   4 +-
 gdb/interps.h                             |  14 +-
 gdb/mi/mi-interp.c                        |  26 ++-
 gdb/mi/mi-interp.h                        |   2 +-
 gdb/observable.h                          |   3 +-
 gdb/solib.c                               |  30 ++-
 gdb/testsuite/gdb.base/dlmopen.exp        | 244 +++++++++++++++++++---
 gdb/testsuite/gdb.mi/mi-dlmopen-lib-dep.c |  21 ++
 gdb/testsuite/gdb.mi/mi-dlmopen-lib.c     |  28 +++
 gdb/testsuite/gdb.mi/mi-dlmopen.c         |  59 ++++++
 gdb/testsuite/gdb.mi/mi-dlmopen.exp       | 222 ++++++++++++++++++++
 gdb/testsuite/lib/gdb.exp                 |  33 +++
 gdb/testsuite/lib/prelink-support.exp     |  33 ---
 17 files changed, 669 insertions(+), 98 deletions(-)
 create mode 100644 gdb/testsuite/gdb.mi/mi-dlmopen-lib-dep.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-dlmopen-lib.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-dlmopen.c
 create mode 100644 gdb/testsuite/gdb.mi/mi-dlmopen.exp


base-commit: 1eb397a6d20b312df11e787533f32d2312ced215
-- 
2.25.4



More information about the Gdb-patches mailing list