Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Simon Marchi <simon.marchi@efficios.com>
Cc: Tom Tromey <tom@tromey.com>,  John Baldwin <jhb@FreeBSD.org>,
	 gdb-patches@sourceware.org
Subject: Re: [PATCH 01/15] Add back declarations for _initialize functions
Date: Fri, 10 Jan 2020 18:43:00 -0000	[thread overview]
Message-ID: <87zhevtao5.fsf@tromey.com> (raw)
In-Reply-To: <23b12f35-00ab-cf51-7aee-994652a688d1@efficios.com> (Simon	Marchi's message of "Thu, 9 Jan 2020 17:50:38 -0500")

>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> 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.  */


  reply	other threads:[~2020-01-10 18:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25  5:27 [PATCH 00/15] Enable -Wmissing-declarations diagnostic Simon Marchi
2019-11-25  5:27 ` [PATCH 12/15] Make functions static in unittests Simon Marchi
2019-11-25  5:27 ` [PATCH 01/15] Add back declarations for _initialize functions Simon Marchi
2020-01-09 18:46   ` John Baldwin
2020-01-09 22:23     ` Simon Marchi
2020-01-09 22:33       ` Tom Tromey
2020-01-09 22:50         ` Simon Marchi
2020-01-10 18:43           ` Tom Tromey [this message]
2020-01-10 21:46             ` Simon Marchi
2019-11-25  5:27 ` [PATCH 06/15] Remove dict_empty/mdict_empty Simon Marchi
2019-11-25  5:27 ` [PATCH 02/15] Include aarch32-tdep.h in aarch32-tdep.c Simon Marchi
2019-11-25  5:27 ` [PATCH 04/15] Remove unused function set_gdb_completion_word_break_characters Simon Marchi
2019-11-25  5:27 ` [PATCH 05/15] Make a bunch of functions static Simon Marchi
2019-11-25  5:27 ` [PATCH 11/15] Remove declaration of tui_set_var_cmd, make definition static Simon Marchi
2019-11-25  5:27 ` [PATCH 03/15] Add missing includes in dwarf-index-write.c and mi/mi-interp.c Simon Marchi
2019-11-25  5:27 ` [PATCH 15/15] Enable -Wmissing-declarations diagnostic Simon Marchi
2019-11-25 22:06   ` Tom Tromey
2019-11-25 22:11     ` Simon Marchi
2019-11-26 14:12       ` Tom Tromey
2019-11-26 19:48         ` Simon Marchi
2019-11-25  5:27 ` [PATCH 07/15] Remove unused overload of exit_inferior_silent Simon Marchi
2019-11-25  5:27 ` [PATCH 13/15] Remove simulator_command declaration, make static Simon Marchi
2019-11-25  5:33 ` [PATCH 09/15] Add declaration to python init func Simon Marchi
2019-11-25  5:33 ` [PATCH 10/15] Remove unused rbreak_command_wrapper and other declarations Simon Marchi
2019-11-25  5:33 ` [PATCH 08/15] Remove info_terminal_command declaration, make definition static Simon Marchi
2019-11-25  5:33 ` [PATCH 14/15] Fix declaration of sparc_xfer_wcookie Simon Marchi
2019-11-25 22:08 ` [PATCH 00/15] Enable -Wmissing-declarations diagnostic Tom Tromey

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=87zhevtao5.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=simon.marchi@efficios.com \
    /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