From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oaFqDdSDSWpIASgAWB0awg (envelope-from ) for ; Sat, 04 Jul 2026 18:06:12 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=K7H6HLF5; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 326AD1E098; Sat, 04 Jul 2026 18:06:12 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 9E48F1E024 for ; Sat, 04 Jul 2026 18:06:11 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 549CF4B9DB41 for ; Sat, 4 Jul 2026 22:06:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 549CF4B9DB41 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=K7H6HLF5 Received: from omta36.uswest2.a.cloudfilter.net (omta36.uswest2.a.cloudfilter.net [35.89.44.35]) by sourceware.org (Postfix) with ESMTPS id BBD2D4BA23DB for ; Sat, 4 Jul 2026 22:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BBD2D4BA23DB Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BBD2D4BA23DB Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783202724; cv=none; b=J505N4wb8iINryfbWrjj7/rJzMVeDkT6mC39GJAUIJZLRC2hEppVB6h8rmx0CtMJ8qI5fFa1YUeglxjPuETzv580w3vCANQ2Z9k4RDzdawNEA7q/0Bdn3uYjzO26jYfGKu9fGkWQunPCMUU1Fm7OwSUoifH30c0iI5iJsvx5cWU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783202724; c=relaxed/simple; bh=ucGEeP49IzBuqdrzsgtcv+8Ml8CoWLMa+N28TIkgyZM=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=qXjCQo0ud7stBIrQ2UrBgTEVTSJ8UALXlONoQKRgGPl5844vD4ne6ydfq8q7bvWWZMCxcm1llBQeRT+wIdd0MgqnCeS820Sa2AzQ+njydQwdIny1Jp1Qt3OVvbxoyBvij7UeG+qL9u/KTnZ5vKpyAZPKG1LCCynZWY921w2moQE= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=K7H6HLF5 reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BBD2D4BA23DB Received: from eig-obgw-6005b.ext.cloudfilter.net ([10.0.30.162]) by cmsmtp with ESMTPS id fyznw6sQ2PpWVg8UEwlThC; Sat, 04 Jul 2026 22:05:22 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id g8UDw087fOYlBg8UDwBMkI; Sat, 04 Jul 2026 22:05:21 +0000 X-Authority-Analysis: v=2.4 cv=FLYbx/os c=1 sm=1 tr=0 ts=6a4983a1 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=ItBw4LHWJt0A:10 a=zstS-IiYAAAA:8 a=PaXK2nC6UOpQtmdM9sQA:9 a=QEXdDO2ut3YA:10 a=4G6NA9xxw8l3yy4pmD5M:22 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5ZX8QGUvwaVIx4UeIgfOThR1MJUNraVCZ1JsQE6I8SE=; b=K7H6HLF5P1Pn8sOBBsLap1VWnI lj2LGx4JsIVGXRATNaAMbaYYYfES7iVBykyMVxtNLZC6McFMsXYoKW8UKcNaz6K/9+z1HlubGlCIy BBf37QcdbHIwBIVHzFHxQsgBn; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:38412 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.2) (envelope-from ) id 1wg8UD-00000000OSH-1SBF; Sat, 04 Jul 2026 16:05:21 -0600 From: Tom Tromey Subject: [PATCH 0/9] Some cleanups and C++-ification of value_print_options Date: Sat, 04 Jul 2026 16:05:14 -0600 Message-Id: <20260704-print-opts-cleanup-v1-0-fb54a5112a8d@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAJqDSWoC/x3MwQrCMAyA4VcZORus0zrmq4iHtotbQNOSVBHG3 t3q8Tv8/wpGymRw6VZQerNxlobDroO0BJkJeWqG3vVnN7gjFmWpmEs1TA8K8io4niZKY/TeDwQ tLEp3/vyn11tzDEYYNUhafqusPLPsn8EqKWzbF+cmMM+EAAAA X-Change-ID: 20260703-print-opts-cleanup-94dec9b5557e To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wg8UD-00000000OSH-1SBF X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net ([192.168.122.1]) [75.166.225.82]:38412 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfEHWgb1eaOrpBTMv34SMyGcCFDaThzr1g1hi71brC4QtHJZZMAautfUTwRXnvEDDhzPQ4tJcMMFVVDkB8wNx49lbXFoSE2f4QMWKcSdDEhxJewAnyQSy xVessIFZvO5/9/kXuIQ1jkA6WkL1K0OppUhHow8qYJfxqHUKRetbgT2eOILXfN1FcRmZgY9y9CMKzi8D1JTNX6CLFd6I4Jg3/T0= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org It seemed to me that it would be cleaner for some value_print_options "accessors" to simply return the objects instead. This series makes this change, and then proceeds to do some other cleanups, primarily converting most pointer to references. Regression tested on x86-64 Fedora 40. Signed-off-by: Tom Tromey --- Tom Tromey (9): Return value_print_options from get_formatted_print_options Return value_print_options from get_no_prettyformat_print_options Convert get_user_print_options Return a const reference from gdbpy_get_print_options Return value_print_options from varobj_formatted_print_options Use 'const' with some value_print_options Don't use 'struct' keyword with value_print_options Use std::forward in fortran_array_walker Use references for value_print_options gdb/ada-lang.c | 11 ++- gdb/ada-lang.h | 4 +- gdb/ada-valprint.c | 86 +++++++++--------- gdb/ada-varobj.c | 15 ++-- gdb/auxv.c | 6 +- gdb/break-catch-exec.c | 4 +- gdb/break-catch-fork.c | 3 +- gdb/break-catch-load.c | 3 +- gdb/break-catch-sig.c | 4 +- gdb/break-catch-syscall.c | 3 +- gdb/break-catch-throw.c | 3 +- gdb/breakpoint.c | 20 ++--- gdb/c-lang.c | 2 +- gdb/c-lang.h | 6 +- gdb/c-valprint.c | 58 ++++++------ gdb/c-varobj.c | 6 +- gdb/char-print.c | 14 +-- gdb/char-print.h | 4 +- gdb/cli/cli-cmds.c | 5 +- gdb/compile/compile.c | 9 +- gdb/cp-valprint.c | 50 +++++------ gdb/d-lang.c | 2 +- gdb/d-lang.h | 2 +- gdb/d-valprint.c | 4 +- gdb/dwarf2/read.c | 7 +- gdb/eval.c | 3 +- gdb/extension-priv.h | 2 +- gdb/extension.c | 2 +- gdb/extension.h | 2 +- gdb/f-array-walker.h | 4 +- gdb/f-lang.c | 2 +- gdb/f-lang.h | 6 +- gdb/f-valprint.c | 48 +++++----- gdb/gdbtypes.h | 2 +- gdb/gnu-v3-abi.c | 13 ++- gdb/go-lang.h | 2 +- gdb/go-valprint.c | 8 +- gdb/guile/guile-internal.h | 4 +- gdb/guile/scm-lazy-string.c | 2 +- gdb/guile/scm-pretty-print.c | 34 +++---- gdb/guile/scm-value.c | 10 +-- gdb/infcmd.c | 21 ++--- gdb/language.c | 12 +-- gdb/language.h | 8 +- gdb/linux-thread-db.c | 6 +- gdb/m2-lang.c | 2 +- gdb/m2-lang.h | 4 +- gdb/m2-valprint.c | 28 +++--- gdb/mi/mi-cmd-stack.c | 6 +- gdb/mi/mi-main.c | 28 +++--- gdb/mips-tdep.c | 17 ++-- gdb/p-lang.c | 2 +- gdb/p-lang.h | 6 +- gdb/p-valprint.c | 68 +++++++------- gdb/printcmd.c | 106 +++++++++++----------- gdb/python/py-framefilter.c | 28 +++--- gdb/python/py-lazy-string.c | 5 +- gdb/python/py-prettyprint.c | 53 ++++++----- gdb/python/py-unwind.c | 5 +- gdb/python/py-value.c | 11 +-- gdb/python/py-varobj.c | 10 +-- gdb/python/python-internal.h | 10 +-- gdb/record-full.c | 7 +- gdb/riscv-tdep.c | 14 ++- gdb/rust-lang.c | 44 ++++----- gdb/rust-lang.h | 12 +-- gdb/skip.c | 3 - gdb/stack.c | 13 ++- gdb/tracepoint.c | 6 +- gdb/typeprint.c | 3 +- gdb/valprint.c | 206 +++++++++++++++++++++---------------------- gdb/valprint.h | 51 ++++++----- gdb/value.c | 15 ++-- gdb/value.h | 8 +- gdb/varobj.c | 33 ++++--- gdb/varobj.h | 4 +- 76 files changed, 617 insertions(+), 713 deletions(-) --- base-commit: 58b8db1ca4e6021161511cb24b18a48fcf8e5546 change-id: 20260703-print-opts-cleanup-94dec9b5557e Best regards, -- Tom Tromey