From patchwork Sun Aug 26 16:53:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 29055 Received: (qmail 129627 invoked by alias); 26 Aug 2018 16:54:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 129472 invoked by uid 89); 26 Aug 2018 16:54:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mailsec113.isp.belgacom.be Received: from mailsec113.isp.belgacom.be (HELO mailsec113.isp.belgacom.be) (195.238.20.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 26 Aug 2018 16:54:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1535302454; x=1566838454; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=/XVn00R47xqoH/8LsdLsHld8vSKmPhrtE/ugUxKej9k=; b=0qSbYMdxdZ8+lzHOdlqxBuahH6MMMPsoOjSwzbevwAYS+234A/o2xhNe /WkgKMYzJABM/Ti10muOV9K4scZ3sA==; Received: from 217.24-133-109.adsl-dyn.isp.belgacom.be (HELO md.home) ([109.133.24.217]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 26 Aug 2018 18:54:12 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFAv2 2/6] Make struct type_print_options default_ptype_flags non static. Date: Sun, 26 Aug 2018 18:53:55 +0200 Message-Id: <20180826165359.1600-3-philippe.waroquiers@skynet.be> In-Reply-To: <20180826165359.1600-1-philippe.waroquiers@skynet.be> References: <20180826165359.1600-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes 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 * 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. */