Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: Dr. Rolf Jansen <rolf.anroni@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [gdbserver] compiling latest server.c (rev. 1.76) with MinGW for running on win32
Date: Thu, 31 Jul 2008 16:19:00 -0000	[thread overview]
Message-ID: <200807311718.40766.pedro@codesourcery.com> (raw)
In-Reply-To: <E608998C-0A86-4C65-ABA7-2366901D1110@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 169 bytes --]

Hi Rolf,

Sorry for dropping out on you.

I checked that gdbserver now builds OK with the attached patch
on mingw32 and linux.

Daniel, OK to check in?

-- 
Pedro Alves

[-- Attachment #2: memmem.diff --]
[-- Type: text/x-diff, Size: 2892 bytes --]

2008-07-31  Rolf Jansen  <rj@surtec.com>
	    Pedro Alves  <pedro@codesourcery.com>

	* configure.ac: Check for memmem declaration.
	* server.c [HAVE_MALLOC_H]: Include malloc.h.
	(disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
	(disable_packet_qfThreadInfo): Unconditionally compile.
	* server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
	* configure, config.in: Regenerate.

---
 gdb/gdbserver/configure.ac |    2 +-
 gdb/gdbserver/server.c     |   19 +++++++++++--------
 gdb/gdbserver/server.h     |    4 ++++
 3 files changed, 16 insertions(+), 9 deletions(-)

Index: src/gdb/gdbserver/configure.ac
===================================================================
--- src.orig/gdb/gdbserver/configure.ac	2008-06-06 12:25:11.000000000 +0100
+++ src/gdb/gdbserver/configure.ac	2008-07-31 17:10:46.000000000 +0100
@@ -61,7 +61,7 @@ AC_TRY_LINK([
   [AC_MSG_RESULT(no)])
 fi
 
-AC_CHECK_DECLS([strerror, perror])
+AC_CHECK_DECLS([strerror, perror, memmem])
 
 AC_CHECK_TYPES(socklen_t, [], [],
 [#include <sys/types.h>
Index: src/gdb/gdbserver/server.c
===================================================================
--- src.orig/gdb/gdbserver/server.c	2008-07-08 00:05:33.000000000 +0100
+++ src/gdb/gdbserver/server.c	2008-07-31 17:10:46.000000000 +0100
@@ -28,6 +28,9 @@
 #if HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #endif
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif
 
 unsigned long cont_thread;
 unsigned long general_thread;
@@ -67,14 +70,6 @@ int terminal_fd;
 /* TERMINAL_FD's original foreground group.  */
 pid_t old_foreground_pgrp;
 
-/* Set if you want to disable optional thread related packets support
-   in gdbserver, for the sake of testing GDB against stubs that don't
-   support them.  */
-int disable_packet_vCont;
-int disable_packet_Tthread;
-int disable_packet_qC;
-int disable_packet_qfThreadInfo;
-
 /* Hand back terminal ownership to the original foreground group.  */
 
 static void
@@ -84,6 +79,14 @@ restore_old_foreground_pgrp (void)
 }
 #endif
 
+/* Set if you want to disable optional thread related packets support
+   in gdbserver, for the sake of testing GDB against stubs that don't
+   support them.  */
+int disable_packet_vCont;
+int disable_packet_Tthread;
+int disable_packet_qC;
+int disable_packet_qfThreadInfo;
+
 static int
 target_running (void)
 {
Index: src/gdb/gdbserver/server.h
===================================================================
--- src.orig/gdb/gdbserver/server.h	2008-07-02 12:35:07.000000000 +0100
+++ src/gdb/gdbserver/server.h	2008-07-31 17:10:46.000000000 +0100
@@ -50,6 +50,10 @@ extern void perror (const char *);
 #endif
 #endif
 
+#if !HAVE_DECL_MEMMEM
+extern void *memmem (const void *, size_t , const void *, size_t);
+#endif
+
 #ifndef ATTR_NORETURN
 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
 #define ATTR_NORETURN __attribute__ ((noreturn))

  reply	other threads:[~2008-07-31 16:19 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
2008-07-18 20:17   ` Dr. Rolf Jansen
2008-07-31 16:19     ` Pedro Alves [this message]
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=200807311718.40766.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=rolf.anroni@gmail.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