Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCH 0/5] Improved support for core files with missing NT_FILE note
Date: Sat, 14 Mar 2026 14:32:17 +0000	[thread overview]
Message-ID: <cover.1773498341.git.aburgess@redhat.com> (raw)

This series improves GDB's support for core files without an NT_FILE
note.  When this note is missing GDB is currently unable to associate
a build-id with any of the shared libraries that loaded as the core
file is opened.  As a result GDB might load the wrong shared library
if a local library happens to have the same name (e.g. is a different
version of the same library), and GDB will not perform a build-id
based lookup either locally, or through debuginfod, for the missing
shared library.

Patches #1 and #2 rework some existing tests.  This gets these tests
into a state where they can be reused for testing the fixes that come
later in the series.

Patches #3 and #4 are minor refactoring patches removing some code
that will make the later patch in this series harder.

Patch #5 is the actual fix.  After this, on GNU/Linux, GDB will be
able to associate a build-id with a shared library, even if the
NT_FILE note is missing from a core file.

Thanks,
Andrew

---

Andrew Burgess (5):
  gdb/testsuite: improve corefile-no-threads.py script
  gdb/testsuite: restructure gdb.base/corefile-buildid.exp
  gdb: remove 'num' argument from gdbarch_read_core_file_mappings
    callback
  gdb: remove pre-loop callback from gdbarch_read_core_file_mappings
  gdb/linux: handle missing NT_FILE note when opening core files

 gdb/arch-utils.c                              |   1 -
 gdb/arch-utils.h                              |   1 -
 gdb/corelow.c                                 |  68 ++--
 gdb/doc/python.texi                           |  10 +-
 gdb/gdbarch-gen.c                             |   4 +-
 gdb/gdbarch-gen.h                             |   4 +-
 gdb/gdbarch.h                                 |   8 +-
 gdb/gdbarch_components.py                     |   1 -
 gdb/gdbcore.h                                 |  28 +-
 gdb/linux-tdep.c                              | 342 +++++++++++-------
 gdb/testsuite/gdb.base/corefile-buildid.exp   | 290 +++++++++++----
 .../gdb.base/corefile-no-threads.exp          |  10 +-
 gdb/testsuite/gdb.base/corefile-no-threads.py |  47 ++-
 gdb/testsuite/gdb.python/py-corefile.py       |   4 +
 14 files changed, 555 insertions(+), 263 deletions(-)


base-commit: e4fe38115fea0a9f357527959893f18ca8d51a03
-- 
2.25.4


             reply	other threads:[~2026-03-14 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-14 14:32 Andrew Burgess [this message]
2026-03-14 14:32 ` [PATCH 1/5] gdb/testsuite: improve corefile-no-threads.py script Andrew Burgess
2026-03-14 14:32 ` [PATCH 2/5] gdb/testsuite: restructure gdb.base/corefile-buildid.exp Andrew Burgess
2026-03-14 14:32 ` [PATCH 3/5] gdb: remove 'num' argument from gdbarch_read_core_file_mappings callback Andrew Burgess
2026-03-14 14:32 ` [PATCH 4/5] gdb: remove pre-loop callback from gdbarch_read_core_file_mappings Andrew Burgess
2026-03-14 14:32 ` [PATCH 5/5] gdb/linux: handle missing NT_FILE note when opening core files Andrew Burgess
2026-04-23 22:08   ` Keith Seitz
2026-05-01 19:09     ` Andrew Burgess
2026-04-23 22:06 ` [PATCH 0/5] Improved support for core files with missing NT_FILE note Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1773498341.git.aburgess@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox