From: Tom Tromey <tromey@adacore.com>
To: Simon Marchi <simark@simark.ca>
Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Change management of tdesc_arch_data
Date: Thu, 17 Sep 2020 14:26:12 -0600 [thread overview]
Message-ID: <87wo0s5evv.fsf@tromey.com> (raw)
In-Reply-To: <ac1a2a3e-db17-9102-6afb-c590a6c6b5c4@simark.ca> (Simon Marchi's message of "Tue, 28 Jul 2020 09:41:00 -0400")
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>> @@ -784,10 +784,8 @@ tdesc_data_alloc (void)
>> architecture). */
>>
>> void
>> -tdesc_data_cleanup (void *data_untyped)
>> +tdesc_arch_data_deleter::operator() (struct tdesc_arch_data *data) const
Simon> I think the comment above this is not relevant, and should be made into the
Simon> usual /* See foo.h. */.
I made this change.
>> data-> arch_regs = early_data->arch_regs;
Simon> Not really important, but this could be an std::move to avoid
Simon> copying the vector.
And this one.
>> + tdesc_arch_data_up tdesc_data;
Simon> Move this where this is used, in the if? That will avoid
Simon> unnecessary construction/destruction.
It's used near the end of the function:
if (tdesc_data != nullptr)
tdesc_use_registers (gdbarch, tdesc, std::move (tdesc_data));
This pattern is typical, so I didn't change anything here.
I'm going to check this patch in shortly.
Tom
prev parent reply other threads:[~2020-09-17 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 19:36 Tom Tromey
2020-07-28 9:14 ` Andrew Burgess
2020-07-28 13:41 ` Simon Marchi
2020-09-17 20:26 ` Tom Tromey [this message]
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=87wo0s5evv.fsf@tromey.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/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