From: Torbjorn SVENSSON <torbjorn.svensson@foss.st.com>
To: "Tom Tromey" <tom@tromey.com>,
"Torbjörn SVENSSON via Gdb-patches" <gdb-patches@sourceware.org>
Cc: <luis.machado@arm.com>, Yvan Roux <yvan.roux@foss.st.com>
Subject: Re: [PATCH v3 1/2] gdb: dwarf2 generic implementation for caching function data
Date: Wed, 25 Jan 2023 10:39:16 +0100 [thread overview]
Message-ID: <f496ea55-0d62-a820-7e83-7cbedf1c378a@foss.st.com> (raw)
In-Reply-To: <87fsc5x9ik.fsf@tromey.com>
On 2023-01-20 20:59, Tom Tromey wrote:
>>>>>> Torbjörn SVENSSON via Gdb-patches <gdb-patches@sourceware.org> writes:
>
>> v2 -> v3:
>> Addressed comments from Tom in
>> https://sourceware.org/pipermail/gdb-patches/2023-January/195882.html
>
> Sorry, I'm afraid you missed a few.
>
>> +struct dwarf2_frame_fn_data
>> +{
>> + /* The cookie to identify the custom function data by. */
>> + fn_prev_register cookie;
>
> The previous review mentioned changing the type of this, but honestly I
> don't really care about that one, this is as good as anything now that
> it's documented.
>
>> +/* See frame.h. */
>> +
>> +void *dwarf2_frame_get_fn_data (frame_info_ptr this_frame, void **this_cache,
>> + fn_prev_register cookie)
>
> gdb style puts the function name at the start of the line.
> There are many examples in the source.
>
>> +void *dwarf2_frame_allocate_fn_data (frame_info_ptr this_frame,
>> + void **this_cache,
>> + fn_prev_register cookie,
>> + unsigned long size)
>
> Here too.
>
>> +{
>> + struct dwarf2_frame_fn_data *fn_data = nullptr;
>> + struct dwarf2_frame_cache *cache
>> + = dwarf2_frame_cache (this_frame, this_cache);
>> +
>> + /* First try to find an existing object. */
>> + void *data = dwarf2_frame_get_fn_data (this_frame, this_cache, cookie);
>> + if (data)
>> + return data;
>
> It seems to me that there is no need to do this check.
> IMO it's fine to just assert that it isn't found.
>
> thanks,
> Tom
Thanks for the review.
I've corrected the points noted above. Still not sure why the
check_GNU_style.py script in GCC contrib does not complain about this..
Anyway, is it okay for trunk with these changes or should I send a v4?
Kind regards,
Torbjörn
next prev parent reply other threads:[~2023-01-25 9:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 10:29 Torbjörn SVENSSON
2023-01-19 10:29 ` [PATCH v3 2/2] gdb/arm: Use new dwarf2 function cache Torbjörn SVENSSON
2023-01-25 16:55 ` Luis Machado
2023-01-25 17:12 ` Simon Marchi
2023-01-25 20:15 ` Torbjorn SVENSSON
2023-01-19 16:53 ` [PATCH v3 1/2] gdb: dwarf2 generic implementation for caching function data Simon Marchi
2023-01-20 14:12 ` Torbjorn SVENSSON
2023-01-20 17:28 ` Simon Marchi
2023-01-20 17:33 ` Luis Machado
2023-01-20 17:43 ` Simon Marchi
2023-01-25 9:34 ` Torbjorn SVENSSON
2023-01-20 19:59 ` Tom Tromey
2023-01-25 9:39 ` Torbjorn SVENSSON [this message]
2023-01-25 16:11 ` 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=f496ea55-0d62-a820-7e83-7cbedf1c378a@foss.st.com \
--to=torbjorn.svensson@foss.st.com \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
--cc=tom@tromey.com \
--cc=yvan.roux@foss.st.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).