This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug remote/13510] New: Cross compile of gdbserver for w32 fails
- From: "nisse at lysator dot liu.se" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Fri, 16 Dec 2011 08:59:58 +0000
- Subject: [Bug remote/13510] New: Cross compile of gdbserver for w32 fails
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=13510
Bug #: 13510
Summary: Cross compile of gdbserver for w32 fails
Product: gdb
Version: 7.3
Status: NEW
Severity: normal
Priority: P2
Component: remote
AssignedTo: unassigned@sourceware.org
ReportedBy: nisse@lysator.liu.se
Classification: Unclassified
I downloaded gdb-7.3, and I tried to build gdbserver fÃr w32 using
./configure --target=i586-pc-mingw32msvc --host=i586-pc-mingw32msvc
--prefix=/usr/local/w32 CC=i586-mingw32msvc-gcc
make
This failed with errors complaining on uintptr_t not defined:
i586-mingw32msvc-gcc -c -g -O2 -I. -I../gdb/gdbserver
-I../gdb/gdbserver/../common -I../gdb/gdbserver/../regformats
-I../gdb/gdbserver/../../include -Wall -Wdeclaration-after-statement
-Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror
../gdb/gdbserver/win32-low.c
../gdb/gdbserver/win32-low.c: In function âchild_add_threadâ:
../gdb/gdbserver/win32-low.c:192: error: âuintptr_tâ undeclared (first use in
this function)
../gdb/gdbserver/win32-low.c:192: error: (Each undeclared identifier is
reported only once
../gdb/gdbserver/win32-low.c:192: error: for each function it appears in.)
../gdb/gdbserver/win32-low.c:192: error: expected â;â before âtlbâ
../gdb/gdbserver/win32-low.c: In function âchild_xfer_memoryâ:
../gdb/gdbserver/win32-low.c:283: error: âuintptr_tâ undeclared (first use in
this function)
../gdb/gdbserver/win32-low.c:283: error: expected â;â before âaddrâ
../gdb/gdbserver/win32-low.c:287: error: âaddrâ undeclared (first use in this
function)
../gdb/gdbserver/win32-low.c: In function âhandle_load_dllâ:
../gdb/gdbserver/win32-low.c:1208: error: âuintptr_tâ undeclared (first use in
this function)
../gdb/gdbserver/win32-low.c:1208: error: expected â;â before âeventâ
../gdb/gdbserver/win32-low.c: In function âhandle_unload_dllâ:
../gdb/gdbserver/win32-low.c:1216: error: âuintptr_tâ undeclared (first use in
this function)
../gdb/gdbserver/win32-low.c:1216: error: expected â,â or â;â before
âcurrent_eventâ
../gdb/gdbserver/win32-low.c: In function âhandle_exceptionâ:
../gdb/gdbserver/win32-low.c:1317: error: âuintptr_tâ undeclared (first use in
this function)
../gdb/gdbserver/win32-low.c:1317: error: expected â)â before âcurrent_eventâ
../gdb/gdbserver/win32-low.c:1317: error: too few arguments to function
âphex_nzâ
After adding a #include <stdint.h> to win32-low.c, it compiles all right. Not
sure if this is the right solution, though.
Maybe I should say something on the big picture:
I want to debug one of gmp's testcases, which fails when cross compiled for
w32, and run under wine. The plan is to build a cross gdb,
--host=x86_64-unknown-linux-gnu --target=i586-pc-mingw32msvc, and use this to
attach to a process run as
wine gdbserver.exe ... test-program.exe
I don't yet know if this will work out. Another alternative would be to cross
compile gdb itself (--target=i586-mingw32msvc --host=i586-mingw32msvc), I'm not
sure if that would be better.
I'm doing all this on a x86_64 machine with debian gnu/linux and the mingw32
packages. The i586-mingw32msvc-gcc cross compiler is version 4.4.4.
Regards,
/Niels MÃller
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.