From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 739363858D1E for ; Tue, 26 Apr 2022 12:03:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 739363858D1E Received: from fencepost.gnu.org ([2001:470:142:3::e]:58562) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njJuO-000731-VZ; Tue, 26 Apr 2022 08:03:08 -0400 Received: from [87.69.77.57] (port=3107 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njJuJ-0004sT-0J; Tue, 26 Apr 2022 08:03:04 -0400 Date: Tue, 26 Apr 2022 15:02:46 +0300 Message-Id: <8335i0m4rd.fsf@gnu.org> From: Eli Zaretskii To: tromey@adacore.com CC: gdb-patches@sourceware.org In-Reply-To: <83o81971wr.fsf@gnu.org> (message from Eli Zaretskii via Gdb-patches on Sun, 10 Apr 2022 11:55:48 +0300) Subject: Re: Metadata style? References: <83tubh9aqc.fsf@gnu.org> <87sfqo91id.fsf@tromey.com> <83o81971wr.fsf@gnu.org> X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2022 12:03:19 -0000 Ping! > Date: Sun, 10 Apr 2022 11:55:48 +0300 > From: Eli Zaretskii via Gdb-patches > Cc: gdb-patches@sourceware.org > > > From: Tom Tromey > > Cc: Tom Tromey , 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 {} 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 (), _("")); > > > > 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{} and @w{@samp{}} annotations > +for errors and @samp{} 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 >