From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 3/3] gdb/python: add gdbpy_register_subsystem mechanism
Date: Fri, 14 Oct 2022 11:20:07 -0600 [thread overview]
Message-ID: <87y1timiew.fsf@tromey.com> (raw)
In-Reply-To: <d9aa843eab3abcf572a7bac05d7b8c9facb53eee.1664729134.git.aburgess@redhat.com> (Andrew Burgess via Gdb-patches's message of "Sun, 2 Oct 2022 17:53:05 +0100")
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
Andrew> All callbacks registered through gdbpy_register_subsystem are added to
Andrew> a vector, and in python.c we iterate over the vector and all the
Andrew> various functions as needed.
Andrew> The only question is when should gdbpy_register_subsystem be called?
Andrew> The answer I think is to make use of GDB's existing _initialize_*
Andrew> function mechanism. A few of the python sub-system files already
Andrew> include an _initialize_* function, but most needed to have one added.
This approach seems a little weird to me, in that it uses the
_initialize_* functions to hook into gdb's existing initialization
approach, but then registers a second layer of initialization functions
in a vector to be called a little later.
What if, instead, something like make-init-c was used, but specifically
for Python initialization (and finalization) functions?
Tom
next prev parent reply other threads:[~2022-10-14 17:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 16:53 [PATCH 0/3] New mechanism to initialise Python components in GDB Andrew Burgess
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 [this message]
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=87y1timiew.fsf@tromey.com \
--to=tom@tromey.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).