This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[rfa] Allow building a cross Cygwin / MinGW debugger
- From: Daniel Jacobowitz <drow at false dot org>
- To: gdb-patches at sourceware dot org
- Date: Tue, 18 Jul 2006 15:40:57 -0400
- Subject: [rfa] Allow building a cross Cygwin / MinGW debugger
I'm about to post Windows native support for gdbserver. While testing it, I
needed a cross debugger from some other platform to Windows; you can almost
build one today, but not quite. This patch fixes that up, by removing an
error and some bits of DLL support.
Of course the cross debugger doesn't have DLL support; neither does the
remote protocol. I've recently implemented DLL support for a remote target
and will be submitting that soon; at that point, I could allow Windows
gdbserver to report DLL events just like a native debugger.
Does this look OK?
--
Daniel Jacobowitz
CodeSourcery
2006-07-18 Daniel Jacobowitz <dan@codesourcery.com>
* configure.in: Allow mingw32 and cygwin targets to build cross-gdb.
* configure: Regenerated.
2006-07-18 Daniel Jacobowitz <dan@codesourcery.com>
* config/i386/cygwin.mt (DEPRECATED_TM_FILE): Delete.
* config/i386/nm-cygwin.h: Add contents of tm-cygwin.h.
* config/i386/tm-cygwin.h: Delete file.
---
configure | 278 ++++++++++++++++++++------------------------
configure.in | 14 --
gdb/config/i386/cygwin.mt | 4
gdb/config/i386/nm-cygwin.h | 6
gdb/config/i386/tm-cygwin.h | 25 ---
5 files changed, 137 insertions(+), 190 deletions(-)
Index: src/configure.in
===================================================================
--- src.orig/configure.in 2006-07-18 14:46:16.000000000 -0400
+++ src/configure.in 2006-07-18 14:51:47.000000000 -0400
@@ -617,13 +617,6 @@ case "${target}" in
i[[3456789]]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
-
- # Can't build gdb for mingw32 if not native.
- case "${host}" in
- i[[3456789]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
- ;;
- esac
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
@@ -634,13 +627,6 @@ case "${target}" in
elif test -d "$srcdir/newlib"; then
echo "Warning: winsup is missing so newlib can't be built."
fi
-
- # Can't build gdb for Cygwin if not native.
- case "${host}" in
- *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
- ;;
- esac
;;
i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \
i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* )
Index: src/gdb/config/i386/cygwin.mt
===================================================================
--- src.orig/gdb/config/i386/cygwin.mt 2006-07-18 14:46:16.000000000 -0400
+++ src/gdb/config/i386/cygwin.mt 2006-07-18 14:51:47.000000000 -0400
@@ -1,6 +1,2 @@
# Target: Intel 386 run win32
TDEPFILES= i386-tdep.o i386-cygwin-tdep.o i387-tdep.o
-DEPRECATED_TM_FILE= tm-cygwin.h
-
-
-
Index: src/gdb/config/i386/nm-cygwin.h
===================================================================
--- src.orig/gdb/config/i386/nm-cygwin.h 2006-07-18 14:46:16.000000000 -0400
+++ src/gdb/config/i386/nm-cygwin.h 2006-07-18 14:51:47.000000000 -0400
@@ -1,5 +1,5 @@
/* Native definitions for Intel x86 running CYGWIN.
- Copyright 2002 Free Software Foundation, Inc.
+ Copyright 2002, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -18,6 +18,10 @@
Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#define ATTACH_NO_WAIT
+#define ADD_SHARED_SYMBOL_FILES dll_symbol_command
+void dll_symbol_command (char *, int);
+
#define I386_USE_GENERIC_WATCHPOINTS
#include "i386/nm-i386.h"
Index: src/gdb/config/i386/tm-cygwin.h
===================================================================
--- src.orig/gdb/config/i386/tm-cygwin.h 2006-07-18 14:46:16.000000000 -0400
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -1,25 +0,0 @@
-/* Macro definitions for i386 running under the win32 API Unix.
-
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004 Free
- Software Foundation, Inc.
-
- This file is part of GDB.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-#define ATTACH_NO_WAIT
-#define ADD_SHARED_SYMBOL_FILES dll_symbol_command
-void dll_symbol_command (char *, int);