From patchwork Sun Jul 1 21:07:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Waroquiers X-Patchwork-Id: 28179 Received: (qmail 104371 invoked by alias); 1 Jul 2018 21:07:52 -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 104230 invoked by uid 89); 1 Jul 2018 21:07:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.4 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=holding, 499, lifetime, objects X-HELO: mailsec107.isp.belgacom.be Received: from mailsec107.isp.belgacom.be (HELO mailsec107.isp.belgacom.be) (195.238.20.103) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 01 Jul 2018 21:07:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=skynet.be; i=@skynet.be; q=dns/txt; s=securemail; t=1530479270; x=1562015270; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=W1uHtbnez6GiIDs7ZV7BSX74tsf1grHhTFtXd4wJxzI=; b=hbXYMdcaApQCq77tKB25Q0xTvy9N7/MQR3aeVmpxbJ5BQXSJFGmxFyDm XFqjX4IT+LYcQ0Y8gZGESLlvQJWY4g==; Received: from 224.41-64-87.adsl-dyn.isp.belgacom.be (HELO md.home) ([87.64.41.224]) by relay.skynet.be with ESMTP/TLS/DHE-RSA-AES128-GCM-SHA256; 01 Jul 2018 23:07:40 +0200 From: Philippe Waroquiers To: gdb-patches@sourceware.org Cc: Philippe Waroquiers Subject: [RFC 2/5] Make struct type_print_options default_ptype_flags non static. Date: Sun, 1 Jul 2018 23:07:31 +0200 Message-Id: <20180701210734.3793-3-philippe.waroquiers@skynet.be> In-Reply-To: <20180701210734.3793-1-philippe.waroquiers@skynet.be> References: <20180701210734.3793-1-philippe.waroquiers@skynet.be> X-IsSubscribed: yes Make struct type_print_options default_ptype_flags non static, as this is 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/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. */