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 242AD3A20FA0 for ; Sun, 10 Apr 2022 08:55:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 242AD3A20FA0 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39466) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndTMM-0001xn-BR; Sun, 10 Apr 2022 04:55:50 -0400 Received: from [87.69.77.57] (port=4661 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 1ndTML-0002Yq-Qr; Sun, 10 Apr 2022 04:55:50 -0400 Date: Sun, 10 Apr 2022 11:55:48 +0300 Message-Id: <83o81971wr.fsf@gnu.org> From: Eli Zaretskii To: Tom Tromey Cc: gdb-patches@sourceware.org In-Reply-To: <87sfqo91id.fsf@tromey.com> (message from Tom Tromey on Thu, 07 Apr 2022 12:44:42 -0600) Subject: Re: Metadata style? References: <83tubh9aqc.fsf@gnu.org> <87sfqo91id.fsf@tromey.com> X-Spam-Status: No, score=2.1 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, T_SCC_BODY_TEXT_LINE 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: Sun, 10 Apr 2022 08:55:52 -0000 > 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