If you want to drop the gdbproxy part of this I understand. I guess we
could add Unix signals to the libwine header but I dont expect anyone
to ever use winedbg on Windows so we just want to build it so a root
"make" doesnt fail. After this there are only linking issues that I
hope to address in a comming patch.
Changelog:
Mingw porting fixes
__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
Index: winedbg/break.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/break.c,v
retrieving revision 1.2
diff -u -r1.2 break.c
--- winedbg/break.c 16 Sep 2002 19:26:48 -0000 1.2
+++ winedbg/break.c 28 Nov 2003 22:15:59 -0000
@@ -21,6 +21,7 @@
*/
#include "config.h"
+#include "wine/port.h"
#include "debugger.h"
#ifdef __i386__
Index: winedbg/db_disasm.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/db_disasm.c,v
retrieving revision 1.2
diff -u -r1.2 db_disasm.c
--- winedbg/db_disasm.c 9 Oct 2003 04:39:01 -0000 1.2
+++ winedbg/db_disasm.c 28 Nov 2003 22:16:01 -0000
@@ -58,6 +58,9 @@
*
*/
+#include "config.h"
+#include "wine/port.h"
+
/*
* Instruction disassembler.
*/
Index: winedbg/debug.l
===================================================================
RCS file: /home/wine/wine/programs/winedbg/debug.l,v
retrieving revision 1.6
diff -u -r1.6 debug.l
--- winedbg/debug.l 26 Nov 2003 04:10:08 -0000 1.6
+++ winedbg/debug.l 28 Nov 2003 22:16:02 -0000
@@ -20,6 +20,9 @@
*/
%{
+#include "config.h"
+#include "wine/port.h"
+
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
Index: winedbg/display.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/display.c,v
retrieving revision 1.2
diff -u -r1.2 display.c
--- winedbg/display.c 14 Oct 2003 20:25:16 -0000 1.2
+++ winedbg/display.c 28 Nov 2003 22:16:02 -0000
@@ -19,6 +19,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
+#include "wine/port.h"
+
#include <stdlib.h>
#include <string.h>
#include <limits.h>
Index: winedbg/expr.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/expr.c,v
retrieving revision 1.4
diff -u -r1.4 expr.c
--- winedbg/expr.c 5 Sep 2003 23:15:41 -0000 1.4
+++ winedbg/expr.c 28 Nov 2003 22:16:03 -0000
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
Index: winedbg/gdbproxy.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/gdbproxy.c,v
retrieving revision 1.15
diff -u -r1.15 gdbproxy.c
--- winedbg/gdbproxy.c 9 Oct 2003 04:39:01 -0000 1.15
+++ winedbg/gdbproxy.c 28 Nov 2003 22:16:06 -0000
@@ -34,13 +34,21 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
+#endif
+#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_NETINET_TCP_H
#include <netinet/tcp.h>
+#endif
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -535,14 +543,18 @@
ret = TRUE;
break;
case EXCEPTION_DATATYPE_MISALIGNMENT:
- gdbctx->last_sig = SIGBUS;
+#ifdef SIGBUS
+ gdbctx->last_sig = SIGBUS;
ret = TRUE;
+#endif
break;
case EXCEPTION_SINGLE_STEP:
/* fall thru */
case EXCEPTION_BREAKPOINT:
+#ifdef SIGTRAP
gdbctx->last_sig = SIGTRAP;
ret = TRUE;
+#endif
break;
case EXCEPTION_FLT_DENORMAL_OPERAND:
case EXCEPTION_FLT_DIVIDE_BY_ZERO:
@@ -568,9 +580,11 @@
ret = TRUE;
break;
case STATUS_POSSIBLE_DEADLOCK:
+#ifdef SIGALARM
gdbctx->last_sig = SIGALRM;
ret = TRUE;
/* FIXME: we could also add here a O packet with additional information */
+#endif
break;
default:
if (gdbctx->trace & GDBPXY_TRC_WIN32_EVENT)
@@ -1975,7 +1989,8 @@
static BOOL gdb_startup(struct gdb_context* gdbctx, DEBUG_EVENT* de, unsigned flags)
{
- int sock;
+#ifdef HAVE_SYS_POLL_H
+ int sock;
struct sockaddr_in s_addrs;
int s_len = sizeof(s_addrs);
struct pollfd pollfd;
@@ -2082,6 +2097,9 @@
}
close(sock);
+#else /* HAVE_SYS_POLL_H */
+ fprintf(stderr, "GDB proxy not supported on this platform");
+#endif /* HAVE_SYS_POLL_H */
return TRUE;
}
@@ -2131,6 +2149,7 @@
BOOL DEBUG_GdbRemote(unsigned flags)
{
+#ifdef HAVE_SYS_POLL_H
struct pollfd pollfd;
struct gdb_context gdbctx;
BOOL doLoop;
@@ -2170,5 +2189,8 @@
}
}
wait(NULL);
+#else /* HAVE_SYS_POLL_H */
+ fprintf(stderr, "Remote GDB proxy not supported on this platform");
+#endif /* HAVE_SYS_POLL_H */
return 0;
}
Index: winedbg/hash.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/hash.c,v
retrieving revision 1.14
diff -u -r1.14 hash.c
--- winedbg/hash.c 14 Oct 2003 20:25:16 -0000 1.14
+++ winedbg/hash.c 28 Nov 2003 22:16:08 -0000
@@ -20,6 +20,8 @@
#include "config.h"
+#include "wine/port.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Index: winedbg/info.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/info.c,v
retrieving revision 1.10
diff -u -r1.10 info.c
--- winedbg/info.c 5 Nov 2003 00:36:23 -0000 1.10
+++ winedbg/info.c 28 Nov 2003 22:16:09 -0000
@@ -20,6 +20,7 @@
*/
#include "config.h"
+#include "wine/port.h"
#include <stdlib.h>
#include <string.h>
Index: winedbg/module.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/module.c,v
retrieving revision 1.4
diff -u -r1.4 module.c
--- winedbg/module.c 1 Apr 2003 00:02:36 -0000 1.4
+++ winedbg/module.c 28 Nov 2003 22:16:10 -0000
@@ -20,6 +20,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
+#include "wine/port.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Index: winedbg/registers.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/registers.c,v
retrieving revision 1.2
diff -u -r1.2 registers.c
--- winedbg/registers.c 18 Jun 2003 03:30:40 -0000 1.2
+++ winedbg/registers.c 28 Nov 2003 22:16:10 -0000
@@ -19,6 +19,8 @@
*/
#include "config.h"
+#include "wine/port.h"
+
#include <string.h>
#include "debugger.h"
Index: winedbg/source.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/source.c,v
retrieving revision 1.4
diff -u -r1.4 source.c
--- winedbg/source.c 16 Oct 2003 19:12:49 -0000 1.4
+++ winedbg/source.c 28 Nov 2003 22:16:10 -0000
@@ -19,6 +19,8 @@
*/
#include "config.h"
+#include "wine/port.h"
+
#include <stdio.h>
#include <stdlib.h>
Index: winedbg/stabs.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/stabs.c,v
retrieving revision 1.10
diff -u -r1.10 stabs.c
--- winedbg/stabs.c 23 Sep 2003 22:54:57 -0000 1.10
+++ winedbg/stabs.c 28 Nov 2003 22:16:13 -0000
@@ -32,6 +32,7 @@
*/
#include "config.h"
+#include "wine/port.h"
#include <sys/types.h>
#include <fcntl.h>
Index: winedbg/stack.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/stack.c,v
retrieving revision 1.1
diff -u -r1.1 stack.c
--- winedbg/stack.c 13 Sep 2002 17:54:28 -0000 1.1
+++ winedbg/stack.c 28 Nov 2003 22:16:13 -0000
@@ -21,6 +21,7 @@
*/
#include "config.h"
+#include "wine/port.h"
#include <stdlib.h>
Index: winedbg/types.c
===================================================================
RCS file: /home/wine/wine/programs/winedbg/types.c,v
retrieving revision 1.5
diff -u -r1.5 types.c
--- winedbg/types.c 9 Oct 2003 04:39:01 -0000 1.5
+++ winedbg/types.c 28 Nov 2003 22:16:14 -0000
@@ -22,6 +22,8 @@
*/
#include "config.h"
+#include "wine/port.h"
+
#include <stdlib.h>
#include <fcntl.h>