Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Undefined uintptr_t with mingw
@ 2010-12-21 16:35 Alberto Luaces
  2010-12-22  4:00 ` Joel Brobecker
  0 siblings, 1 reply; 6+ messages in thread
From: Alberto Luaces @ 2010-12-21 16:35 UTC (permalink / raw)
  To: gdb-patches

Hello,

while building gdb with the mingw cross-compiler from Debian
(4.4.4-0.1+b1) I run across this error:

i586-mingw32msvc-gcc -c -Wall -g -O2 -D__USE_MINGW_ACCESS    -I. -I../../../gdb-7.2/gdb/gdbserver -I../../../gdb-7.2/gdb/gdbserver/../common -I../../../gdb-7.2/gdb/gdbserver/../regformats -I../../../gdb-7.2/gdb/gdbserver/../../include ../../../gdb-7.2/gdb/gdbserver/win32-low.c
../../../gdb-7.2/gdb/gdbserver/win32-low.c: In function ‘child_add_thread’:
../../../gdb-7.2/gdb/gdbserver/win32-low.c:192: error: ‘uintptr_t’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:192: error: (Each undeclared identifier is reported only once
../../../gdb-7.2/gdb/gdbserver/win32-low.c:192: error: for each function it appears in.)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:192: error: expected ‘;’ before ‘tlb’
../../../gdb-7.2/gdb/gdbserver/win32-low.c: In function ‘child_xfer_memory’:
../../../gdb-7.2/gdb/gdbserver/win32-low.c:283: error: ‘uintptr_t’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:283: error: expected ‘;’ before ‘addr’
../../../gdb-7.2/gdb/gdbserver/win32-low.c:287: error: ‘addr’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c: In function ‘handle_load_dll’:
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1208: error: ‘uintptr_t’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1208: error: expected ‘;’ before ‘event’
../../../gdb-7.2/gdb/gdbserver/win32-low.c: In function ‘handle_unload_dll’:
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1216: error: ‘uintptr_t’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1216: error: expected ‘,’ or ‘;’ before ‘current_event’
../../../gdb-7.2/gdb/gdbserver/win32-low.c: In function ‘handle_exception’:
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1317: error: ‘uintptr_t’ undeclared (first use in this function)
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1317: error: expected ‘)’ before ‘current_event’
../../../gdb-7.2/gdb/gdbserver/win32-low.c:1317: error: too few arguments to function ‘phex_nz’
make[4]: *** [win32-low.o] Error 1

Since uintptr_t is defined in <stdint.h>, I succesfully built gdb with
this change:

diff -ur gdb-7.2orig/gdb/gdbserver/win32-low.c gdb-7.2/gdb/gdbserver/win32-low.c
--- gdb-7.2orig/gdb/gdbserver/win32-low.c	2010-12-21 16:27:10.000000000 +0100
+++ gdb-7.2/gdb/gdbserver/win32-low.c	2010-12-21 17:21:56.000000000 +0100
@@ -33,6 +33,7 @@
 #include <sys/param.h>
 #include <malloc.h>
 #include <process.h>
+#include <stdint.h>
 
 #ifndef USE_WIN32API
 #include <sys/cygwin.h>

Does it sound right to apply to GDB?

Thanks,

-- 
Alberto


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-12-22 13:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 16:35 Undefined uintptr_t with mingw Alberto Luaces
2010-12-22  4:00 ` Joel Brobecker
2010-12-22 12:29   ` Pedro Alves
2010-12-22 13:11     ` Pedro Alves
2010-12-22 14:32     ` Joel Brobecker
2010-12-22 13:12       ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox