From: Guinevere Larsen <guinevere@redhat.com>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Simplify get_frame_unwind_table
Date: Fri, 17 Jan 2025 16:14:01 -0300 [thread overview]
Message-ID: <f40087e7-9c57-4c90-aa18-3b7282f086a1@redhat.com> (raw)
In-Reply-To: <20250117190453.1405884-1-tromey@adacore.com>
On 1/17/25 4:04 PM, Tom Tromey wrote:
> This simplifies get_frame_unwind_table, changing it to use the
> registry 'emplace' method and to pass the initialization iterators to
> the constructor. This fixes a build problem on x86 -- reported by the
> auto-builder -- as a side effect.
I've tested this on buildbot and it fix the build. I encourage you to
push it!
Tested-By: Guinevere Larsen <guinevere@redhat.com>
--
Cheers,
Guinevere Larsen
She/Her/Hers
> ---
> gdb/frame-unwind.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/gdb/frame-unwind.c b/gdb/frame-unwind.c
> index fab9b3c981a..33b23f91feb 100644
> --- a/gdb/frame-unwind.c
> +++ b/gdb/frame-unwind.c
> @@ -73,15 +73,10 @@ static std::vector<const frame_unwind *> &
> get_frame_unwind_table (struct gdbarch *gdbarch)
> {
> std::vector<const frame_unwind *> *table = frame_unwind_data.get (gdbarch);
> - if (table != nullptr)
> - return *table;
> -
> - table = new std::vector<const frame_unwind *>;
> - table->insert (table->begin (), standard_unwinders.begin (),
> - standard_unwinders.end ());
> -
> - frame_unwind_data.set (gdbarch, table);
> -
> + if (table == nullptr)
> + table = frame_unwind_data.emplace (gdbarch,
> + standard_unwinders.begin (),
> + standard_unwinders.end ());
> return *table;
> }
>
next prev parent reply other threads:[~2025-01-17 19:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 19:04 Tom Tromey
2025-01-17 19:14 ` Guinevere Larsen [this message]
2025-01-17 20:33 ` Guinevere Larsen
2025-01-17 21:27 ` Tom Tromey
2025-01-18 15:25 ` Tom de Vries
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=f40087e7-9c57-4c90-aa18-3b7282f086a1@redhat.com \
--to=guinevere@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.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