Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/9] Some cleanups and C++-ification of value_print_options
@ 2026-07-04 22:05 Tom Tromey
  2026-07-04 22:05 ` [PATCH 1/9] Return value_print_options from get_formatted_print_options Tom Tromey
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Tom Tromey @ 2026-07-04 22:05 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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>


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-04 22:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-04 22:05 [PATCH 0/9] Some cleanups and C++-ification of value_print_options Tom Tromey
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox