public inbox for gdb-patches@sourceware.org
 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] New Python hook for missing debug information
Date: Wed, 18 Oct 2023 11:53:18 +0100	[thread overview]
Message-ID: <cover.1697626088.git.aburgess@redhat.com> (raw)

This series adds a new Python hook to GDB, this hook allows a user to
register a handler object which will be called whenever GDB fails to
locate any debug information for an objfile it is loading.  These
handler objects can (potentially) perform host or project specific
actions to help GDB locate the missing debug information.

Commits #1 and #2 are refactoring.  These merge the separate debug
information lookup code from coffread.c and elfread.c.

Commit #3 is more refactoring, this simplifies the now merged code.

Commit #4 implements the framework for the new hook within GDB, but
doesn't implement the Python side of things yet.

Commit #5 is where I add the Python side of things, it's only at this
point that a user can actually hook into GDB.

---

Andrew Burgess (5):
  gdb/coffread: bring separate debug file logic into line with elfread.c
  gdb: merge debug symbol file lookup code from coffread & elfread paths
  gdb: refactor objfile::find_and_add_separate_symbol_file
  gdb: add an extension language hook for missing debug info
  gdb: implement missing debug handler hook for Python

 gdb/NEWS                                      |  26 +
 gdb/coffread.c                                |  28 +-
 gdb/data-directory/Makefile.in                |   2 +
 gdb/doc/python.texi                           | 136 +++++
 gdb/elfread.c                                 |  57 +--
 gdb/extension-priv.h                          |   7 +
 gdb/extension.c                               |  19 +
 gdb/extension.h                               |  62 +++
 gdb/objfiles.h                                |  10 +
 gdb/python/lib/gdb/__init__.py                |  41 ++
 gdb/python/lib/gdb/command/missing_debug.py   | 226 +++++++++
 gdb/python/lib/gdb/missing_debug.py           | 169 +++++++
 gdb/python/py-progspace.c                     |  51 ++
 gdb/python/python.c                           |  83 ++-
 gdb/symfile-debug.c                           | 154 ++++++
 gdb/testsuite/gdb.python/py-missing-debug.c   |  22 +
 gdb/testsuite/gdb.python/py-missing-debug.exp | 473 ++++++++++++++++++
 gdb/testsuite/gdb.python/py-missing-debug.py  | 120 +++++
 18 files changed, 1608 insertions(+), 78 deletions(-)
 create mode 100644 gdb/python/lib/gdb/command/missing_debug.py
 create mode 100644 gdb/python/lib/gdb/missing_debug.py
 create mode 100644 gdb/testsuite/gdb.python/py-missing-debug.c
 create mode 100644 gdb/testsuite/gdb.python/py-missing-debug.exp
 create mode 100644 gdb/testsuite/gdb.python/py-missing-debug.py


base-commit: 5d4a870e05ac45e3f5a301c672a4079995b5db7a
-- 
2.25.4


             reply	other threads:[~2023-10-18 10:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 10:53 Andrew Burgess [this message]
2023-10-18 10:53 ` [PATCH 1/5] gdb/coffread: bring separate debug file logic into line with elfread.c Andrew Burgess
2023-10-20 17:35   ` Tom Tromey
2023-10-24 11:59     ` Andrew Burgess
2023-10-18 10:53 ` [PATCH 2/5] gdb: merge debug symbol file lookup code from coffread & elfread paths Andrew Burgess
2023-10-18 13:18   ` Jon Turney
2023-10-18 17:25     ` Andrew Burgess
2023-10-18 10:53 ` [PATCH 3/5] gdb: refactor objfile::find_and_add_separate_symbol_file Andrew Burgess
2023-10-20 17:50   ` Tom Tromey
2023-10-24 12:03     ` Andrew Burgess
2023-11-08 15:22     ` Andrew Burgess
2023-10-18 10:53 ` [PATCH 4/5] gdb: add an extension language hook for missing debug info Andrew Burgess
2023-10-18 10:53 ` [PATCH 5/5] gdb: implement missing debug handler hook for Python Andrew Burgess
2023-10-18 12:08   ` Eli Zaretskii
2023-11-08 15:48 ` [PATCHv2 0/5] New Python hook for missing debug information Andrew Burgess
2023-11-08 15:48   ` [PATCHv2 1/5] gdb/coffread: bring separate debug file logic into line with elfread.c Andrew Burgess
2023-11-08 15:48   ` [PATCHv2 2/5] gdb: merge debug symbol file lookup code from coffread & elfread paths Andrew Burgess
2023-11-08 15:48   ` [PATCHv2 3/5] gdb: refactor objfile::find_and_add_separate_symbol_file Andrew Burgess
2023-11-08 15:48   ` [PATCHv2 4/5] gdb: add an extension language hook for missing debug info Andrew Burgess
2023-11-08 15:48   ` [PATCHv2 5/5] gdb: implement missing debug handler hook for Python Andrew Burgess
2023-11-12 22:38     ` Tom Tromey
2023-11-15 12:36     ` Tom de Vries
2023-11-16 10:59       ` Andrew Burgess
2023-11-16 11:16         ` Tom de Vries
2023-11-16 17:21           ` Andrew Burgess
2023-11-16 15:26         ` Tom Tromey
2023-11-12 22:39   ` [PATCHv2 0/5] New Python hook for missing debug information Tom Tromey
2023-11-13 16:04     ` Andrew Burgess
2023-11-13 17:18       ` Tom Tromey
2023-11-12 22:40   ` Tom Tromey

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.1697626088.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).