From patchwork Fri Jan 10 18:43:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37288 Received: (qmail 87955 invoked by alias); 10 Jan 2020 18:43:11 -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 87947 invoked by uid 89); 10 Jan 2020 18:43:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=sk:unknown, tracepoint, HX-Languages-Length:2612 X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.46.156) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 10 Jan 2020 18:43:09 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 2A2FF2F70 for ; Fri, 10 Jan 2020 12:43:07 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id pzFTiGAg3iJ43pzFTiXnuj; Fri, 10 Jan 2020 12:43:07 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iujZwv6mLNAhqSFWAuGkJcB4tfXVvTYAD1UmvpiOTk4=; b=PjQP1+NRHUi1nrDEjKNMryeaCA evncrfbamQqCRpdURv5KM9GuGlGJoGuEFQENaeJqqgMFE7KpY4JfhkIo6ploz2HY5PHcCnT13ej/3 08DsIxmlTRjKJZIKfFoReyRar; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:37462 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1ipzFS-003mLg-Nj; Fri, 10 Jan 2020 11:43:06 -0700 From: Tom Tromey To: Simon Marchi Cc: Tom Tromey , John Baldwin , gdb-patches@sourceware.org Subject: Re: [PATCH 01/15] Add back declarations for _initialize functions References: <20191125052655.22696-1-simon.marchi@efficios.com> <20191125052655.22696-2-simon.marchi@efficios.com> <87a76wxntd.fsf@tromey.com> <23b12f35-00ab-cf51-7aee-994652a688d1@efficios.com> Date: Fri, 10 Jan 2020 11:43:06 -0700 In-Reply-To: <23b12f35-00ab-cf51-7aee-994652a688d1@efficios.com> (Simon Marchi's message of "Thu, 9 Jan 2020 17:50:38 -0500") Message-ID: <87zhevtao5.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 >>>>> "Simon" == Simon Marchi writes: Simon> I have just uploaded it to the "missing-declarations" branch on my github: Simon> https://github.com/simark/binutils-gdb/tree/missing-declarations Thanks. Simon> I have updated the patches slightly to account for the new unittests. So if you Simon> try to build, you'll stumble directly on the build error that made me give up: I think just adding a few seemingly-redundant declarations is enough. At least, the appended made it compile for me. "IP_AGENT_EXPORT_FUNC" takes care of the static/extern distinction already. Tom diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 2ef94e6998d..bbca48b2efd 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -370,6 +370,9 @@ read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) # define UNKNOWN_SIDE_EFFECTS() do {} while (0) #endif +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC void stop_tracing (void); + IP_AGENT_EXPORT_FUNC void stop_tracing (void) { @@ -377,6 +380,9 @@ stop_tracing (void) UNKNOWN_SIDE_EFFECTS(); } +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC void flush_trace_buffer (void); + IP_AGENT_EXPORT_FUNC void flush_trace_buffer (void) { @@ -1496,6 +1502,9 @@ init_trace_buffer (LONGEST bufsize) #ifdef IN_PROCESS_AGENT +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC void about_to_request_buffer_space (void); + IP_AGENT_EXPORT_FUNC void about_to_request_buffer_space (void) { @@ -2091,6 +2100,9 @@ create_trace_state_variable (int num, int gdb) return tsv; } +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC LONGEST get_trace_state_variable_value (int num); + IP_AGENT_EXPORT_FUNC LONGEST get_trace_state_variable_value (int num) { @@ -2117,6 +2129,10 @@ get_trace_state_variable_value (int num) return tsv->value; } +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC void set_trace_state_variable_value (int num, + LONGEST val); + IP_AGENT_EXPORT_FUNC void set_trace_state_variable_value (int num, LONGEST val) { @@ -5786,6 +5802,10 @@ EXTERN_C_PUSH IP_AGENT_EXPORT_VAR collecting_t *collecting; EXTERN_C_POP +/* This is needed for -Wmissing-declarations. */ +IP_AGENT_EXPORT_FUNC void gdb_collect (struct tracepoint *tpoint, + unsigned char *regs); + /* This routine, called from the jump pad (in asm) is designed to be called from the jump pads of fast tracepoints, thus it is on the critical path. */