public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 0/3] New mechanism to initialise Python components in GDB
Date: Sun,  2 Oct 2022 17:53:02 +0100	[thread overview]
Message-ID: <cover.1664729134.git.aburgess@redhat.com> (raw)

This series is a rewrite of how we initialise Python components within
GDB.  Patch #3 is where the actual change took place.

Patches #1 and #2 relate to dependencies between different Python
components.  Currently there are two pairs of components that have an
initialisation order dependency.  The change I propose in patch #3
revealed these dependencies which I think are otherwise pretty hidden.
In patches #1 and #2 I've tweaked things so these dependencies are now
(I think) more explicit.

This is a pure refactoring project.  I've had a rough outline of patch
#3 kicking about for a while, but I recently thought I would need to
add a new Python component finalize function (similar to
gdbpy_finalize_micommands), so took the time to finish this series
off...

... then it turned out I didn't need to add a new finalize function at
all.

Personally, I think this is an improvement, so I'm posting it, but I'd
love to hear others thoughts.

Thanks,
Andrew

---

Andrew Burgess (3):
  gdb/python: break dependencies between gdbpy_initialize_* functions
  gdb/python: break more dependencies between gdbpy_initialize_*
    functions
  gdb/python: add gdbpy_register_subsystem mechanism

 gdb/python/py-arch.c             |  11 ++-
 gdb/python/py-auto-load.c        |   9 ++-
 gdb/python/py-block.c            |   9 ++-
 gdb/python/py-breakpoint.c       |  30 ++++++--
 gdb/python/py-cmd.c              |   9 ++-
 gdb/python/py-connection.c       |   4 +-
 gdb/python/py-disasm.c           |  11 ++-
 gdb/python/py-event.c            |   9 ++-
 gdb/python/py-evtregistry.c      |   9 ++-
 gdb/python/py-finishbreakpoint.c |  14 +++-
 gdb/python/py-frame.c            |   9 ++-
 gdb/python/py-function.c         |   9 ++-
 gdb/python/py-gdb-readline.c     |  10 ++-
 gdb/python/py-inferior.c         |  11 ++-
 gdb/python/py-infthread.c        |  11 ++-
 gdb/python/py-instruction.c      |  50 +++++++++++---
 gdb/python/py-instruction.h      |  13 ++--
 gdb/python/py-lazy-string.c      |   9 ++-
 gdb/python/py-linetable.c        |   9 ++-
 gdb/python/py-membuf.c           |  11 ++-
 gdb/python/py-micmd.c            |   9 ++-
 gdb/python/py-objfile.c          |   9 ++-
 gdb/python/py-param.c            |   9 ++-
 gdb/python/py-progspace.c        |   9 ++-
 gdb/python/py-record-btrace.c    |   9 ++-
 gdb/python/py-record.c           |  11 ++-
 gdb/python/py-registers.c        |  11 ++-
 gdb/python/py-symbol.c           |   9 ++-
 gdb/python/py-symtab.c           |   9 ++-
 gdb/python/py-tui.c              |   9 ++-
 gdb/python/py-type.c             |   9 ++-
 gdb/python/py-unwind.c           |  34 +++++----
 gdb/python/py-value.c            |   9 ++-
 gdb/python/py-xmethods.c         |   9 ++-
 gdb/python/python-internal.h     | 114 ++++++++++++-------------------
 gdb/python/python.c              |  73 ++++++++++----------
 36 files changed, 427 insertions(+), 172 deletions(-)

-- 
2.25.4


             reply	other threads:[~2022-10-02 16:53 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-02 16:53 Andrew Burgess [this message]
2022-10-02 16:53 ` [PATCH 1/3] gdb/python: break dependencies between gdbpy_initialize_* functions Andrew Burgess
2022-10-14 17:06   ` Tom Tromey
2022-10-20 15:58     ` Andrew Burgess
2022-10-02 16:53 ` [PATCH 2/3] gdb/python: break more " Andrew Burgess
2022-10-14 17:06   ` Tom Tromey
2022-10-20 15:59     ` Andrew Burgess
2022-10-02 16:53 ` [PATCH 3/3] gdb/python: add gdbpy_register_subsystem mechanism Andrew Burgess
2022-10-14 17:20   ` Tom Tromey
2022-10-21 13:17     ` [PATCHv2] gdb/python: add mechanism to manage Python initialization functions Andrew Burgess
2023-04-17 15:26       ` Tom Tromey
2023-05-05 17:27         ` Andrew Burgess
2023-05-05 20:07           ` 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.1664729134.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).