Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Alberto Luaces <aluaces@udc.es>
To: gdb-patches@sources.redhat.com
Subject: Undefined uintptr_t with mingw
Date: Tue, 21 Dec 2010 16:35:00 -0000	[thread overview]
Message-ID: <87k4j3krv3.fsf@eps142.cdf.udc.es> (raw)

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


             reply	other threads:[~2010-12-21 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 16:35 Alberto Luaces [this message]
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

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=87k4j3krv3.fsf@eps142.cdf.udc.es \
    --to=aluaces@udc.es \
    --cc=gdb-patches@sources.redhat.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