From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 1/3] Use function_name_style to print Ada and C function names
Date: Sat, 12 Jan 2019 16:29:00 -0000 [thread overview]
Message-ID: <1547310557.5979.5.camel@skynet.be> (raw)
In-Reply-To: <87bm4lx2v3.fsf@tromey.com>
On Sat, 2019-01-12 at 09:22 -0700, Tom Tromey wrote:
> > > > > > "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:
>
> Philippe> * ada-typeprint.c (print_func_type): Print function name
> Philippe> style to print function name.
> Philippe> * c-typeprint.c (c_print_type_1): Likewise.
>
> These are printing type names, not function names -- so I wonder whether
> we want to apply the function name styling here.
>
> Any comments on this aspect? I am not sure myself.
ada-typeprint.c:print_func_type is only called to print types that are
functions. So, that effectively prints a function name.
c-typeprint.c (c_print_type_1) is effectively called to print whatever
type (so not only functions), but the following added condition
should ensure function name style is only used for function names:
-Â Â Â Â Â fputs_filtered (varstring, stream);
+Â Â Â Â Â if (code == TYPE_CODE_FUNC || code == TYPE_CODE_METHOD)
+Â Â Â Â Â Â Â fputs_styled (varstring, function_name_style.style (), stream );
+Â Â Â Â Â else
+Â Â Â Â Â Â Â fputs_filtered (varstring, stream);
>
> On the one hand, it isn't a function name; maybe we would like a type
> style, but then maybe a type style would be too noisy somehow?
>
> On the other hand, maybe calling out function type names looks nicer.
>
> Philippe> + fputs_styled (varstring, function_name_style.style (), stream );
>
> Extra space before the close paren.
I will fix this, once/if a go to push ...
Thanks
Philippe
next prev parent reply other threads:[~2019-01-12 16:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 22:01 [RFA 0/3] Have GDB better styled Philippe Waroquiers
2019-01-10 22:01 ` [RFA 1/3] Use function_name_style to print Ada and C function names Philippe Waroquiers
2019-01-12 16:22 ` Tom Tromey
2019-01-12 16:29 ` Philippe Waroquiers [this message]
2019-01-12 22:59 ` Tom Tromey
[not found] ` <20190113051818.GE22922@adacore.com>
2019-01-13 13:05 ` Philippe Waroquiers
2019-01-10 22:01 ` [RFA 3/3] Make symtab.c better styled Philippe Waroquiers
2019-01-12 16:26 ` Tom Tromey
2019-01-12 16:48 ` Philippe Waroquiers
2019-01-12 22:58 ` Tom Tromey
2019-01-10 22:01 ` [RFA 2/3] Use address style to print addresses in breakpoint information Philippe Waroquiers
2019-01-12 16:26 ` 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=1547310557.5979.5.camel@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.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