From: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: "Alexandra Hájková via Gdb-patches" <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2] Use styled_string when defering warnings when loading separate debug files
Date: Tue, 18 Apr 2023 14:20:51 +0200 [thread overview]
Message-ID: <CAJVr-EMFhKxMu+OsS25S7QVhia1gzNUP-TzP69iwFbGK8iqwrQ@mail.gmail.com> (raw)
In-Reply-To: <87jzya4jya.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]
I think instead of a std::vector<string_file>, what I meant was just use
> a single string_file.
>
> The caller can make it, using something like:
>
> string_file file (gdb_stderr->can_emit_style_escape ());
>
> Alexandra> + string_file warnings (true);
>
> ... since I think 'true' isn't always correct.
>
When is it not true?
>
> Alexandra> + warnings.printf ("\"%ps\":separate debug info file has
> no debug info",
> Alexandra> + styled_string (file_name_style.style (),
> Alexandra> + bfd_get_filename
> (abfd.get ())));
>
> Then this printf can either add a 'warning:' prefix like warning() does,
> or we can add an overload of "warning" that takes a ui_file as its first
> parameter.
>
So you would prefer me to use a single string_file instead of a vector of
those. That means I'll have just a single string and I'll be appending each
new warning to it? I used a vector because I don't know how to easily split
the warnings when printing them. Do you mean I should add an overload of a
"warning" that would be capable of splitting strings? But why is such a
solution better then simply using a vector of string_file?
Thank you for the review,
Alexandra
next prev parent reply other threads:[~2023-04-18 12:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2023-04-21 14:07 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2023-02-16 19:56 [PATCH] " Alexandra Hájková
2023-02-17 12:35 ` [PATCH v2] " Alexandra Hájková
2023-02-25 10:43 ` Andrew Burgess
2023-02-26 17:36 ` 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=CAJVr-EMFhKxMu+OsS25S7QVhia1gzNUP-TzP69iwFbGK8iqwrQ@mail.gmail.com \
--to=ahajkova@redhat.com \
--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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).