Compiling GDB on Windows using mingw64 toolchain

Jan Vrany
2018-03-04T17:19:30Z

Hi there,

I'm trying to compile recent (git master or 8.x) GDB in Windows using
mingw64 toolchain,
but so far I failed. git master as well as gdb-8.1-branch and gdb-8.0-
branch fail to
compile with following error:

---
x86_64-w64-mingw32-g++ -x c++ -g -O2 -I. -I../../gdb
-I../../gdb/common -I../../gdb/config
-DLOCALEDIR="\"/c/msys64/mingw64/share/locale\"" -DHAVE_CONFIG_H
-I../../gdb/../include/opcode -I../../gdb/../opcodes/.. -
I../../gdb/../zlib -I../bfd -I../../gdb/../bfd -I../../gdb/../include
-I../libdecnumber -I../../gdb/../libdecnumber -
I../../gdb/gnulib/import -Ibuild-gnulib/import
-DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 -
I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-
value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -c -o gdb.o
-MT gdb.o -MMD -MP -MF ./.deps/gdb.Tpo ../../gdb/gdb.c
In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,
from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,
from
C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40,
from C:/msys64/mingw64/include/c++/6.3.0/string:40,
from ../../gdb/common/common-utils.h:23,
from ../../gdb/common/common-defs.h:78,
from ../../gdb/defs.h:28,
from ../../gdb/gdb.c:19:
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using ::wint_t;
---
The first commit that seems to fail with this error - according to my
tests - is
da804164742b83965b487bbff5b6334f2e63fe91 (Introduce gdb::unique_ptr).
However, the older commist than this one don't compile either (other
errors in `windows-nat.c`, see below).

The GCC I'm using to compile GDB is MSYS2-built GCC 6.3. I tried to
compile master on Linux
with GCC 6.4 and, as expected, it compiles just fine).

You may find more details (such as params to configure, GCC version and
and compilation output below.

I'd appreciate any help, I'm not a C++ guy (and not much of a Windows
guy, too) so I'm bit lost.
Does anyone here tried to compile GDB under mingw64? If so, could you
please
share the details how you managed so I can try following the same
steps?

Thanks a lot!

Jan

* Parameters to `configure`:

MINGW_CHOST=x86_64-w64-mingw32
MINGW_PREFIX=/c/msys64/mingw64

./configure \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--prefix=${MINGW_PREFIX} \
--enable-targets="i686-w64-mingw32,x86_64-w64-mingw32" \
--enable-64-bit-bfd \
--disable-werror \
--disable-win32-registry \
--disable-rpath \
--with-system-gdbinit=${MINGW_PREFIX}/etc/gdbinit \
--with-python=${MINGW_PREFIX}/bin/python-config-u.sh \
--with-expat \
--with-libiconv-prefix=${MINGW_PREFIX} \
--with-zlib \
--with-lzma \
--with-system-readline \
--enable-tui

* GCC version:

> x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (Rev3, Built by MSYS2 project) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

* Master: commit b9671caf8fe1abd737846edf7dcd627870f986cc
(handle_general_set: Remove useless xstrdup)

---
x86_64-w64-mingw32-g++ -x c++ -g -O2 -I. -I../../gdb
-I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/
share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode
-I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd -I../../g
db/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-
gnulib/import
-DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 -
I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-
val
ue -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-si
gn-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -
c -o arch/i386.o -MT arch/i386.o -MMD -MP -MF arch/.deps
/i386.Tpo
../../gdb/arch/i386.c

In file included from
C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/string:40,

from ../../gdb/common/common-
utils.h:23,

from ../../gdb/common/common-
defs.h:78,

from
../../gdb/arch/i386.c:18:

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using
::wint_t;

^

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from
../../gdb/common/gdb_unique_ptr.h:23:0,

from ../../gdb/common/common-
defs.h:92,

from
../../gdb/arch/i386.c:18:

C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre
cision [-
fpermissive]

const auto __intptr =
reinterpret_cast<uintptr_t>(__ptr);

^

make[2]: *** [Makefile:1600: arch/i386.o] Error
1

make[2]: *** Waiting for unfinished
jobs....

In file included from
C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/string:40,

from ../../gdb/common/common-
utils.h:23,

from ../../gdb/common/common-
defs.h:78,

from
../../gdb/defs.h:28,

from
../../gdb/gdb.c:19:

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using
::wint_t;

^

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from
../../gdb/common/gdb_unique_ptr.h:23:0,

from ../../gdb/common/common-
defs.h:92,

from
../../gdb/defs.h:28,

from
../../gdb/gdb.c:19:

C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre
cision [-
fpermissive]

const auto __intptr =
reinterpret_cast<uintptr_t>(__ptr);

^

make[2]: *** [Makefile:1600: gdb.o] Error
1

In file included from
C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/bits/char_traits.h:40,

from
C:/msys64/mingw64/include/c++/6.3.0/string:40,

from ../../gdb/common/common-
utils.h:23,

from ../../gdb/common/common-
defs.h:78,

from
../../gdb/defs.h:28,

from ../../gdb/i386-
tdep.c:20:

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using
::wint_t;

^

C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from
../../gdb/common/gdb_unique_ptr.h:23:0,

from ../../gdb/common/common-
defs.h:92,

from
../../gdb/defs.h:28,

from ../../gdb/i386-
tdep.c:20:

C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses pre
cision [-
fpermissive]

const auto __intptr =
reinterpret_cast<uintptr_t>(__ptr);

^

make[2]: *** [Makefile:1600: i386-tdep.o] Error
1

make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32/gdb'
make[1]: *** [Makefile:10428: all-gdb] Error
2

make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32'
make: *** [Makefile:857: all] Error
2

jv@WIN7
H:\Projects\gdb
---

* First bad revision: commit da804164742b83965b487bbff5b6334f2e63fe91
(Introduce gdb::unique_ptr)

---
x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common
-I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\""
-DHAVE_CONFIG_H -I../../gdb/../include/opcode
-I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd
-I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-
gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 -
I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-
value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-write-strings -Wno-narrowing -Wno-format -c -o amd64-windows-
tdep.o -MT amd64-windows-tdep.o -MMD -MP -MF .deps/amd64-windows-
tdep.Tpo ../../gdb/amd64-windows-tdep.c
In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,
from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,
from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40,
from C:/msys64/mingw64/include/c++/6.3.0/memory:72,
from ../../gdb/common/gdb_unique_ptr.h:77,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/gdb.c:19:
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using ::wint_t;
^
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from ../../gdb/common/gdb_unique_ptr.h:77:0,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/gdb.c:19:
C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [-
fpermissive]
const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
^
make[2]: *** [Makefile:1124: gdb.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,
from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,
from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40,
from C:/msys64/mingw64/include/c++/6.3.0/memory:72,
from ../../gdb/common/gdb_unique_ptr.h:77,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/amd64-windows-tdep.c:18:
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using ::wint_t;
^
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from ../../gdb/common/gdb_unique_ptr.h:77:0,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/amd64-windows-tdep.c:18:
C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [-
fpermissive]
const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
^
make[2]: *** [Makefile:1124: amd64-windows-tdep.o] Error 1
In file included from C:/msys64/mingw64/include/c++/6.3.0/cwchar:44:0,
from
C:/msys64/mingw64/include/c++/6.3.0/bits/postypes.h:40,
from C:/msys64/mingw64/include/c++/6.3.0/iosfwd:40,
from C:/msys64/mingw64/include/c++/6.3.0/memory:72,
from ../../gdb/common/gdb_unique_ptr.h:77,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/amd64-tdep.c:22:
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected
unqualified-id before 'int'
using ::wint_t;
^
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: expected ';'
before 'int'
C:/msys64/mingw64/include/c++/6.3.0/cwchar:139:11: error: declaration
does not declare anything [-fpermissive]
In file included from ../../gdb/common/gdb_unique_ptr.h:77:0,
from ../../gdb/common/common-defs.h:86,
from ../../gdb/defs.h:28,
from ../../gdb/amd64-tdep.c:22:
C:/msys64/mingw64/include/c++/6.3.0/memory: In function 'void*
std::align(std::size_t, std::size_t, void*&, std::size_t&)':
C:/msys64/mingw64/include/c++/6.3.0/memory:117:58: error: cast from
'void*' to 'gl_uintptr_t {aka long unsigned int}' loses precision [-
fpermissive]
const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
^
make[2]: *** [Makefile:1124: amd64-tdep.o] Error 1
make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32/gdb'
make[1]: *** [Makefile:10463: all-gdb] Error 2
make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32'
make: *** [Makefile:858: all] Error 2

jv@WIN7 H:\Projects\gdb
---

* Last good revision: commit b928b56ea67da30216b79abd6a87ffda99fc911d
(HEAD, refs/bisect/good-b928b56ea67da30216b79abd6a87ffda99fc911d)

Fails to compie:
---
x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common
-I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\""
-DHAVE_CONFIG_H -I../../gdb/../include/opcode
-I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd
-I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-
gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 -
I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-
value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-write-strings -Wno-narrowing -Wno-format -c -o x86-dregs.o -MT
x86-dregs.o -MMD -MP -MF .deps/x86-dregs.Tpo ../../gdb/nat/x86-dregs.c
x86_64-w64-mingw32-g++ -g -O2 -I. -I../../gdb -I../../gdb/common
-I../../gdb/config -DLOCALEDIR="\"/c/msys64/mingw64/share/locale\""
-DHAVE_CONFIG_H -I../../gdb/../include/opcode
-I../../gdb/../opcodes/.. -I../../gdb/../zlib -I../bfd
-I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber
-I../../gdb/../libdecnumber -I../../gdb/gnulib/import -Ibuild-
gnulib/import -DTUI=1 -I/c/msys64/mingw64/include -DMS_WIN64 -
I/mingw64/include/python2.7 -Wall -Wpointer-arith -Wno-unused -Wunused-
value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-write-strings -Wno-narrowing -Wno-format -c -o windows-nat.o -MT
windows-nat.o -MMD -MP -MF .deps/windows-nat.Tpo ../../gdb/windows-
nat.c
../../gdb/ser-mingw.c: In function 'int ser_windows_open(serial*, const
char*)':
../../gdb/ser-mingw.c:67:41: error: cast from 'HANDLE {aka void*}' to
'gl_intptr_t {aka long int}' loses precision [-fpermissive]
scb->fd = _open_osfhandle ((intptr_t) h, O_RDWR);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_drain_output(serial*)':
../../gdb/ser-mingw.c:109:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_flush_output(serial*)':
../../gdb/ser-mingw.c:117:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_flush_input(serial*)':
../../gdb/ser-mingw.c:125:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_send_break(serial*)':
../../gdb/ser-mingw.c:133:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'void ser_windows_raw(serial*)':
../../gdb/ser-mingw.c:150:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_setstopbits(serial*, int)':
../../gdb/ser-mingw.c:175:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int ser_windows_setparity(serial*,
int)':
../../gdb/ser-mingw.c:204:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int
ser_windows_setbaudrate(serial*, int)':
../../gdb/ser-mingw.c:236:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'void ser_windows_close(serial*)':
../../gdb/ser-mingw.c:257:47: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
CancelIo ((HANDLE) _get_osfhandle (scb->fd));
^
../../gdb/ser-mingw.c: In function 'void
ser_windows_wait_handle(serial*, void**, void**)':
../../gdb/ser-mingw.c:277:46: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int ser_windows_read_prim(serial*,
size_t)':
../../gdb/ser-mingw.c:342:39: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int ser_windows_write_prim(serial*,
const void*, size_t)':
../../gdb/ser-mingw.c:365:39: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'DWORD
console_select_thread(void*)':
../../gdb/ser-mingw.c:542:39: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int fd_is_pipe(int)':
../../gdb/ser-mingw.c:621:49: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
if (PeekNamedPipe ((HANDLE) _get_osfhandle (fd), NULL, 0, NULL,
NULL, NULL))
^
../../gdb/ser-mingw.c: In function 'int fd_is_file(int)':
../../gdb/ser-mingw.c:630:47: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
if (GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_DISK)
^
../../gdb/ser-mingw.c: In function 'DWORD pipe_select_thread(void*)':
../../gdb/ser-mingw.c:645:39: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'DWORD file_select_thread(void*)':
../../gdb/ser-mingw.c:688:39: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
h = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int pipe_windows_read(serial*,
size_t)':
../../gdb/ser-mingw.c:974:57: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE pipeline_out = (HANDLE) _get_osfhandle (scb->fd);
^
../../gdb/ser-mingw.c: In function 'int pipe_windows_write(serial*,
const void*, size_t)':
../../gdb/ser-mingw.c:1005:56: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
pipeline_in = (HANDLE) _get_osfhandle (pipeline_in_fd);
^
../../gdb/ser-mingw.c: In function 'int pipe_avail(serial*, int)':
../../gdb/ser-mingw.c:1052:41: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
HANDLE h = (HANDLE) _get_osfhandle (fd);
^
make[2]: *** [Makefile:1124: ser-mingw.o] Error 1
make[2]: *** Waiting for unfinished jobs....
../../gdb/windows-nat.c: In function 'windows_thread_info*
windows_add_thread(ptid_t, HANDLE, void*)':
../../gdb/windows-nat.c:390:51: error: cast from 'void*' to
'gl_uintptr_t {aka long unsigned int}' loses precision [-fpermissive]
th->thread_local_base = (CORE_ADDR) (uintptr_t) tlb;
^~~
../../gdb/windows-nat.c: In function 'void signal_event_command(char*,
int)':
../../gdb/windows-nat.c:855:17: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
((HANDLE) event_id == INVALID_HANDLE_VALUE))
^~~~~~~~
../../gdb/windows-nat.c:858:22: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
SetEvent ((HANDLE) event_id);
^~~~~~~~
../../gdb/windows-nat.c:859:25: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
CloseHandle ((HANDLE) event_id);
^~~~~~~~
../../gdb/windows-nat.c: In function 'int
handle_output_debug_string(target_waitstatus*)':
../../gdb/windows-nat.c:872:55: error: cast from 'LPSTR {aka char*}' to
'gl_uintptr_t {aka long unsigned int}' loses precision [-fpermissive]
((CORE_ADDR) (uintptr_t)
current_event.u.DebugString.lpDebugStringData,
^~~~~~~~~~~~~~~~
~
../../gdb/windows-nat.c: In function 'target_xfer_status
windows_xfer_memory(gdb_byte*, const gdb_byte*, ULONGEST, ULONGEST,
ULONGEST*)':
../../gdb/windows-nat.c:2428:30: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
(LPVOID) (uintptr_t) memaddr, writebuf,
^~~~~~~
../../gdb/windows-nat.c:2433:31: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
(LPCVOID) (uintptr_t) memaddr, len);
^~~~~~~
../../gdb/windows-nat.c:2440:30: warning: cast to pointer from integer
of different size [-Wint-to-pointer-cast]
(LPCVOID) (uintptr_t) memaddr, readbuf,
^~~~~~~
../../gdb/windows-nat.c: In function 'target_xfer_status
windows_xfer_shared_libraries(target_ops*, target_object, const char*,
gdb_byte*, const gdb_byte*, ULONGEST, ULONGEST, ULONGEST*)':
../../gdb/windows-nat.c:2512:31: error: cast from 'LPVOID {aka void*}'
to 'gl_uintptr_t {aka long unsigned int}' loses precision [-
fpermissive]
(uintptr_t) so->lm_info->load_addr,
^~~~~~~~~
make[2]: *** [Makefile:1124: windows-nat.o] Error 1
make[2]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32/gdb'
make[1]: *** [Makefile:10463: all-gdb] Error 2
make[1]: Leaving directory '/h/Projects/gdb/sources_win/build-x86_64-
w64-mingw32'
make: *** [Makefile:858: all] Error 2

jv@WIN7 H:\Projects\gdb
---