Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [RFAv2 2/6] Make struct type_print_options default_ptype_flags non static.
Date: Sun, 26 Aug 2018 16:54:00 -0000	[thread overview]
Message-ID: <20180826165359.1600-3-philippe.waroquiers@skynet.be> (raw)
In-Reply-To: <20180826165359.1600-1-philippe.waroquiers@skynet.be>

Make struct type_print_options default_ptype_flags non static,
as this will be needed in the type matching logic of
info [args|functions|locals|variables],
to ensure the type matching uses the same setting as the whatis command.

gdb/ChangeLog
2018-08-26  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

	* typeprint.h (default_ptype_flags): New extern.
	* typeprint.c (default_ptype_flags): Make non-static.
---
 gdb/typeprint.c | 5 +++--
 gdb/typeprint.h | 4 ++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 7a0b7627ed..20925b7dcc 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -49,9 +49,10 @@ const struct type_print_options type_print_raw_options =
   NULL				/* global_printers */
 };
 
-/* The default flags for 'ptype' and 'whatis'.  */
 
-static struct type_print_options default_ptype_flags =
+/* See typeprint.h.  */
+
+struct type_print_options default_ptype_flags =
 {
   0,				/* raw */
   1,				/* print_methods */
diff --git a/gdb/typeprint.h b/gdb/typeprint.h
index edd8c396c8..e098782cf4 100644
--- a/gdb/typeprint.h
+++ b/gdb/typeprint.h
@@ -105,6 +105,10 @@ struct type_print_options
 
 extern const struct type_print_options type_print_raw_options;
 
+/* The default flags for 'ptype' and 'whatis'.  */
+
+extern struct type_print_options default_ptype_flags;
+
 /* A hash table holding typedef_field objects.  This is more
    complicated than an ordinary hash because it must also track the
    lifetime of some -- but not all -- of the contained objects.  */
-- 
2.18.0


  parent reply	other threads:[~2018-08-26 16:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-26 16:54 [RFAv2 0/6] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] Philippe Waroquiers
2018-08-26 16:54 ` [RFAv2 5/6] Announce changes in NEWS to info [args|functions|locals|variables] Philippe Waroquiers
2018-08-26 18:21   ` Eli Zaretskii
2018-08-27  4:39     ` Philippe Waroquiers
2018-08-27 14:59       ` Eli Zaretskii
2018-08-26 16:54 ` Philippe Waroquiers [this message]
2018-08-26 16:54 ` [RFAv2 6/6] Add a test case for info args|functions|locals|variables [-q] [-t TYPEREGEXP] [NAMEREGEXP] Philippe Waroquiers
2018-08-26 16:54 ` [RFAv2 1/6] New cli-utils.h/.c function extract_info_print_args Philippe Waroquiers
2018-09-18 15:31   ` Tom Tromey
2018-09-23 20:16     ` Philippe Waroquiers
2018-09-24 13:07       ` Tom Tromey
2018-09-25  4:37         ` Philippe Waroquiers
2018-08-26 16:54 ` [RFAv2 4/6] Document changes to info [args|functions|locals|variables] Philippe Waroquiers
2018-08-26 18:19   ` Eli Zaretskii
2018-08-26 16:54 ` [RFAv2 3/6] Add [-q] [-t TYPEREGEXP] [NAMEREGEXP] args " Philippe Waroquiers
2018-09-18 15:52   ` Tom Tromey
2018-09-23 21:34     ` Philippe Waroquiers
2018-09-06 20:16 ` PING Re: [RFAv2 0/6] info [args|functions|locals|variables] [-q] [-t TYPEREGEXP] [NAMEREGEXP] Philippe Waroquiers
2018-09-13 19:27 ` PING^2 " Philippe Waroquiers

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=20180826165359.1600-3-philippe.waroquiers@skynet.be \
    --to=philippe.waroquiers@skynet.be \
    --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