Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 0/9] Some cleanups and C++-ification of value_print_options
Date: Sat, 04 Jul 2026 16:05:14 -0600	[thread overview]
Message-ID: <20260704-print-opts-cleanup-v1-0-fb54a5112a8d@tromey.com> (raw)

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.com>
---
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 <tom@tromey.com>


             reply	other threads:[~2026-07-04 22:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04 22:05 Tom Tromey [this message]
2026-07-04 22:05 ` [PATCH 1/9] Return value_print_options from get_formatted_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 2/9] Return value_print_options from get_no_prettyformat_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 3/9] Convert get_user_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 4/9] Return a const reference from gdbpy_get_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 5/9] Return value_print_options from varobj_formatted_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 6/9] Use 'const' with some value_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 7/9] Don't use 'struct' keyword with value_print_options Tom Tromey
2026-07-04 22:05 ` [PATCH 8/9] Use std::forward in fortran_array_walker Tom Tromey
2026-07-04 22:05 ` [PATCH 9/9] Use references for value_print_options 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=20260704-print-opts-cleanup-v1-0-fb54a5112a8d@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /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