From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: "Dr. Rolf Jansen" <rj@surtec.com>
Subject: Re: [gdbserver] compiling latest server.c (rev. 1.76) with MinGW for running on win32
Date: Fri, 18 Jul 2008 19:32:00 -0000 [thread overview]
Message-ID: <200807182032.31901.pedro@codesourcery.com> (raw)
In-Reply-To: <CA429CE7-12AD-4308-B44A-23D2F5E416EF@surtec.com>
Hi Rolf,
On Friday 18 July 2008 18:32:32, Dr. Rolf Jansen wrote:
> The latest server.c rev 1.76 does produce warnings when compiled with
> the MinGW tools:
>
> server.c: In function 'start_inferior':
> server.c:107: warning: implicit declaration of function 'alloca'
> server.c:107: warning: incompatible implicit declaration of built-in
> function 'alloca'
> server.c: In function 'handle_search_memory_1':
> server.c:356: warning: implicit declaration of function 'memmem'
> server.c:356: warning: assignment makes pointer from integer without a
> cast
> MinGW defines alloca() in <malloc.h> and memmem() is not built-in. I
> think this should eventually be addressed in the configure script,
> however, as a quick fix, I added at the top of server.c:
> #if USE_WIN32API
> #include <malloc.h>
This bit be done with...
#if HAVE_MALLOC_H
#include <malloc.h>
#endif
... instead. We're already doing that in utils.c.
> void *memmem (const void *haystack_start, size_t haystack_len, const
> void *needle_start, size_t needle_len);
> #endif
Hmmm, shouldn't we be picking up memmem's definition from gnulib's string.h,
since we're using memmem from gnulib?
> In addition, linking of gdbserver.exe fails because of undefined
> references:
>
> remote-utils.o:remote-utils.c:(.text+0x1057): undefined reference to
> `_disable_packet_Tthread'
> In order to resolve the linking errors, the definition of the
> respective variables must be moved out of the conditional block
> (#ifdef SIGTTOU ... #endif), because they are used also within non-
> conditional code in remote-utils.c and in server.c.
>
Ooops. Yes, it should move out of the #if block. It was just an
oversight. No need to add the SIGTTOU checks around the
--disable-packet handling.
--
Pedro Alves
next prev parent reply other threads:[~2008-07-18 19:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 17:33 Dr. Rolf Jansen
2008-07-18 19:32 ` Pedro Alves [this message]
2008-07-18 20:17 ` Dr. Rolf Jansen
2008-07-31 16:19 ` Pedro Alves
2008-07-31 16:48 ` Daniel Jacobowitz
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=200807182032.31901.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=rj@surtec.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