From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org>
Cc: Tom Tromey <tom@tromey.com>, Andrew Burgess <aburgess@redhat.com>
Subject: Re: [PATCH] Style history variable output
Date: Sun, 22 Oct 2023 09:01:18 -0600 [thread overview]
Message-ID: <87a5savgzl.fsf@tromey.com> (raw)
In-Reply-To: <87jzw6w8e0.fsf@redhat.com> (Andrew Burgess via Gdb-patches's message of "Wed, 14 Jun 2023 13:11:51 +0100")
>>>>> "Andrew" == Andrew Burgess via Gdb-patches <gdb-patches@sourceware.org> writes:
[ old patch ]
>> - gdb_printf ("$%d = ", histindex);
>> + gdb_printf ("%p[$%d%p] = ", variable_name_style.style ().ptr (),
>> + histindex, nullptr);
Andrew> How about:
Andrew> std::string idx = string_printf ("$%d", histindex);
Andrew> gdb_printf ("%ps = ", styled_string (variable_name_style.style (),
Andrew> idx.c_str ()));
Andrew> Then the '$' and the '%d' part will be styled as one...
I spent some time trying to fix gdb_printf here, but eventually gave up
on it. It's probably doable but a bit tricky.
Meanwhile I've applied your suggestion and I'm going to finally check
this in.
Tom
prev parent reply other threads:[~2023-10-22 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-12 23:11 Tom Tromey
2023-06-14 12:11 ` Andrew Burgess
2023-10-22 15:01 ` 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=87a5savgzl.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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).