From: Tom Tromey <tom@tromey.com>
To: "Alexandra Hájková via Gdb-patches" <gdb-patches@sourceware.org>
Cc: "Alexandra Hájková" <ahajkova@redhat.com>
Subject: Re: [PATCH v2] Use styled_string when defering warnings when loading separate debug files
Date: Sun, 26 Feb 2023 10:36:31 -0700 [thread overview]
Message-ID: <875yboz5uo.fsf@tromey.com> (raw)
In-Reply-To: <20230217123547.2737612-1-ahajkova@redhat.com> ("Alexandra =?utf-8?B?SMOhamtvdsOh?= via Gdb-patches"'s message of "Fri, 17 Feb 2023 13:35:47 +0100")
>>>>> "Alexandra" == Alexandra Hájková via Gdb-patches <gdb-patches@sourceware.org> writes:
Alexandra> This improves commit 6647f05df023b63bbe056e9167e9e234172fa2ca, the
Alexandra> filenames used in the warnings are styled properly now.
Alexandra> +/* Use callbacks to produce the warnings. */
Alexandra> +
Alexandra> +static void
Alexandra> +add_warning (warnings_vec *vec, std::string filename)
Alexandra> +{
Alexandra> + vec->emplace_back ([filename] () {
Alexandra> + warning (_("\"%ps\": separate debug info file has no debug info"),
Alexandra> + styled_string (file_name_style.style (),
Alexandra> + filename.c_str()));
Alexandra> + });
This works but it seems like it would be a lot simpler to just use a
ui_file rather than introduce a vector of callback functions that emit
warnings.
Tom
next prev parent reply other threads:[~2023-02-26 17:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-16 19:56 [PATCH] " Alexandra Hájková
2023-02-17 9:18 ` Andrew Burgess
2023-02-17 12:35 ` [PATCH v2] " Alexandra Hájková
2023-02-25 10:43 ` Andrew Burgess
2023-02-26 17:36 ` Tom Tromey [this message]
2023-03-20 14:56 Alexandra Hájková
2023-03-30 8:11 ` Alexandra Petlanova Hajkova
2023-04-11 12:40 ` Alexandra Petlanova Hajkova
2023-04-17 15:17 ` Tom Tromey
2023-04-18 12:20 ` Alexandra Petlanova Hajkova
2023-04-21 14:07 ` 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=875yboz5uo.fsf@tromey.com \
--to=tom@tromey.com \
--cc=ahajkova@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).