This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFAv2 2/6] Make struct type_print_options default_ptype_flags non static.
- From: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- To: gdb-patches at sourceware dot org
- Cc: Philippe Waroquiers <philippe dot waroquiers at skynet dot be>
- Date: Sun, 26 Aug 2018 18:53:55 +0200
- Subject: [RFAv2 2/6] Make struct type_print_options default_ptype_flags non static.
- References: <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