From: Eli Zaretskii <eliz@gnu.org>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Metadata style?
Date: Sun, 10 Apr 2022 11:55:48 +0300 [thread overview]
Message-ID: <83o81971wr.fsf@gnu.org> (raw)
In-Reply-To: <87sfqo91id.fsf@tromey.com> (message from Tom Tromey on Thu, 07 Apr 2022 12:44:42 -0600)
> From: Tom Tromey <tromey@adacore.com>
> Cc: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
> Date: Thu, 07 Apr 2022 12:44:42 -0600
>
> Eli> But there's no explanation in the manual what is the "metadata"
> Eli> object. What is it, and how can I display it in GDB to see the style
> Eli> in action?
>
> First, sorry about this, I completely slipped on writing documentation
> for this.
>
> There's a test for this style:
>
> gdb_test_no_output "set print repeat 3"
> gdb_test "print {0,0,0,0,0,0,0,0}" \
> " = \\{0 [limited_style {<repeats.*8.*times>} metadata]\\}"
>
> It's used in a number of places where gdb is attempting to display some
> kind of data from the inferior but instead prints some
> internally-generated text, e.g.:
>
> fprintf_styled (stream, metadata_style.style (), _("<unavailable>"));
>
> I'm not completely sure of the best way to describe this.
Thanks. How about the following addition to the manual?
--- gdb/doc/gdb.texinfo~0 2022-03-20 06:59:56.000000000 +0200
+++ gdb/doc/gdb.texinfo 2022-04-10 11:53:37.405750000 +0300
@@ -26283,6 +26283,16 @@
the command @command{apropos -v REGEXP} uses the highlight style to
mark the documentation parts matching @var{regexp}.
+@item metadata
+Control the styling of data annotations added by @value{GDBN} to data
+it displays. By default, this style's intensity is dim. Metadata
+annotations include the @samp{repeats @var{N} times} annotation for
+suppressed display of repeated array elements (@pxref{Print Strings}),
+@samp{<unavailable>} and @w{@samp{<error @var{descr}>}} annotations
+for errors and @samp{<optimized-out>} annotations for optimized-out
+values in displaying stack frame information in backtraces
+(@pxref{Backtrace}), etc.
+
@item tui-border
Control the styling of the TUI border. Note that, unlike other
styling options, only the color of the border can be controlled via
next prev parent reply other threads:[~2022-04-10 8:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-28 18:46 Eli Zaretskii
2022-04-07 11:14 ` Eli Zaretskii
2022-04-07 18:44 ` Tom Tromey
2022-04-10 8:55 ` Eli Zaretskii [this message]
2022-04-26 12:02 ` Eli Zaretskii
2022-05-04 12:40 ` Eli Zaretskii
2022-05-16 14:11 ` Tom Tromey
2022-05-16 16:06 ` Eli Zaretskii
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=83o81971wr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.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).