From: Guinevere Larsen <guinevere@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v5 1/5] gdb: make gdbarch store a vector of frame unwinders
Date: Mon, 14 Oct 2024 15:18:08 -0300 [thread overview]
Message-ID: <c280bdc8-5809-431e-b67e-1f9de99ae700@redhat.com> (raw)
In-Reply-To: <87v7xydrz5.fsf@linaro.org>
On 10/11/24 10:34 PM, Thiago Jung Bauermann wrote:
> Hello,
>
> Tom Tromey <tom@tromey.com> writes:
>
>>>>>>> "Guinevere" == Guinevere Larsen <guinevere@redhat.com> writes:
>> Guinevere> Seeing as a future patch of this series wants to refactor the
>> Guinevere> frame_unwind struct to use inheritance, and we'd like to not restrict
>> Guinevere> the future derived classes on what destructors are allowed. In
>> Guinevere> preparation for that change, this commit adds an std::vector to gdbarch
>> Guinevere> to store the unwinders in.
>>
>> Using a vector is fine, but I still think that this approach
>> makes gdbarch mildly less opaque. That is, now code anywhere can modify
>> the unwinder list in any way; whereas currently this is constrained to
>> the interface provided by frame-unwind.c.
> Do you think it would be better if the vector was kept in a registry,
> like the current frame_unwind_table is? I.e, changing:
>
> static const registry<gdbarch>::key<struct frame_unwind_table>
> frame_unwind_data;
>
> to:
>
> static const registry<gdbarch>::key<std::vector<const frame_unwind *>>
> frame_unwind_data;
>
> ?
>
I am not a big fan of the registry subsystem, so I would prefer to keep
it as a simple vector. However, if you are concerned about the
opaqueness change, Tromey, I can try to make it more opaque. I just
personally find that registry tends to make the code too opaque for
programmers as well as the program itself :-)
So if you want more separation, I would personally prefer to look into
only receiving a copy of the unwinder list, and gdbarch is responsible
for adding and removing things. Just let me know and I can give it a shot
--
Cheers,
Guinevere Larsen
She/Her/Hers
next prev parent reply other threads:[~2024-10-14 18:18 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 18:42 [PATCH v5 0/5] Modernize frame unwinders and add disable feature Guinevere Larsen
2024-10-01 18:42 ` [PATCH v5 1/5] gdb: make gdbarch store a vector of frame unwinders Guinevere Larsen
2024-10-02 21:49 ` Thiago Jung Bauermann
2024-10-08 17:01 ` Guinevere Larsen
2024-10-03 18:33 ` Simon Marchi
2024-10-04 18:37 ` Tom Tromey
2024-10-12 1:34 ` Thiago Jung Bauermann
2024-10-14 18:18 ` Guinevere Larsen [this message]
2024-10-17 22:53 ` Tom Tromey
2024-10-18 17:40 ` Guinevere Larsen
2024-10-17 23:41 ` Tom Tromey
2024-10-01 18:42 ` [PATCH v5 2/5] gdb: add "unwinder class" to " Guinevere Larsen
2024-10-02 22:08 ` Thiago Jung Bauermann
2024-10-03 18:46 ` Simon Marchi
2024-10-08 18:22 ` Guinevere Larsen
2024-10-08 18:37 ` Simon Marchi
2024-10-01 18:42 ` [PATCH v5 3/5] gdb: Migrate frame unwinders to use C++ classes Guinevere Larsen
2024-10-03 0:23 ` Thiago Jung Bauermann
2024-10-09 18:16 ` Guinevere Larsen
2024-10-03 20:06 ` Simon Marchi
2024-10-04 5:21 ` Simon Marchi
2024-10-10 14:10 ` Guinevere Larsen
2024-10-10 16:28 ` Simon Marchi
2024-10-09 20:00 ` Guinevere Larsen
2024-10-01 18:42 ` [PATCH v5 4/5] gdb: introduce ability to disable frame unwinders Guinevere Larsen
2024-10-02 6:10 ` Eli Zaretskii
2024-10-04 17:57 ` Guinevere Larsen
2024-10-03 2:45 ` Thiago Jung Bauermann
2024-10-08 19:23 ` Guinevere Larsen
2024-10-06 2:51 ` Simon Marchi
2024-10-09 13:32 ` Guinevere Larsen
2024-10-09 15:38 ` Simon Marchi
2024-10-01 18:42 ` [PATCH v5 5/5] gdb/testsuite: Test for a backtrace through object without debuginfo Guinevere Larsen
2024-10-03 2:47 ` Thiago Jung Bauermann
2024-10-03 6:58 ` Gerlicher, Klaus
2024-10-09 14:56 ` Guinevere Larsen
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=c280bdc8-5809-431e-b67e-1f9de99ae700@redhat.com \
--to=guinevere@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
--cc=tom@tromey.com \
/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