public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Move val_prettyformat to valprint.h
Date: Tue,  5 Sep 2023 12:36:16 -0600	[thread overview]
Message-ID: <20230905183616.2042673-1-tromey@adacore.com> (raw)

I stumbled across an ancient FIXME comment that was easy to fix --
val_prettyformat does not need to be in defs.h, and is easily moved to
valprint.h, where (despite what the comment says) it belongs.

Tested by rebuilding.
---
 gdb/defs.h     | 14 --------------
 gdb/valprint.h | 11 +++++++++++
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/gdb/defs.h b/gdb/defs.h
index 454475b203c..f5af3e617c4 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -410,20 +410,6 @@ enum info_proc_what
 extern unsigned input_radix;
 extern unsigned output_radix;
 
-/* * Possibilities for prettyformat parameters to routines which print
-   things.  Like enum language, this should be in value.h, but needs
-   to be here for the same reason.  FIXME:  If we can eliminate this
-   as an arg to LA_VAL_PRINT, then we can probably move it back to
-   value.h.  */
-
-enum val_prettyformat
-  {
-    Val_no_prettyformat = 0,
-    Val_prettyformat,
-    /* * Use the default setting which the user has specified.  */
-    Val_prettyformat_default
-  };
-
 /* * Optional native machine support.  Non-native (and possibly pure
    multi-arch) targets do not need a "nm.h" file.  This will be a
    symlink to one of the nm-*.h files, built by the `configure'
diff --git a/gdb/valprint.h b/gdb/valprint.h
index cf5e2f210e4..0a8878055d7 100644
--- a/gdb/valprint.h
+++ b/gdb/valprint.h
@@ -22,6 +22,17 @@
 
 #include "cli/cli-option.h"
 
+/* Possibilities for prettyformat parameters to routines which print
+   things.  */
+
+enum val_prettyformat
+  {
+    Val_no_prettyformat = 0,
+    Val_prettyformat,
+    /* * Use the default setting which the user has specified.  */
+    Val_prettyformat_default
+  };
+
 /* This is used to pass formatting options to various value-printing
    functions.  */
 struct value_print_options
-- 
2.40.1


             reply	other threads:[~2023-09-05 18:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-05 18:36 Tom Tromey [this message]
2023-09-18 18:21 ` 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=20230905183616.2042673-1-tromey@adacore.com \
    --to=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).