This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[mingw]gdb CVS HEAD build error


I have build error when building gdbserver.exe
Here is the log:
mingw32-gcc -c  -g -O2 -D__USE_MINGW_ACCESS    -I. -I../../../gdb/gdb/gdbserver -I../../../gdb/gdb/gdbserver/../common -I../../../gdb/gdb/gdbserver/../regformats -I../../../gdb/gdb/gdbserver/../../include -I../../../gdb/gdb/gdbserver/../gnulib/import -Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror ../../../gdb/gdb/gdbserver/../common/buffer.c -DGDBSERVER
../../../gdb/gdb/gdbserver/../common/buffer.c: In function 'buffer_xml_printf':
../../../gdb/gdb/gdbserver/../common/buffer.c:144:9: error: unknown conversion type character 'l' in format [-Werror=format]
../../../gdb/gdb/gdbserver/../common/buffer.c:144:9: error: too many arguments for format [-Werror=format-extra-args]
../../../gdb/gdb/gdbserver/../common/buffer.c:147:9: error: unknown conversion type character 'l' in format [-Werror=format]
../../../gdb/gdb/gdbserver/../common/buffer.c:147:9: error: too many arguments for format [-Werror=format-extra-args]
../../../gdb/gdb/gdbserver/../common/buffer.c:150:9: error: unknown conversion type character 'l' in format [-Werror=format]
../../../gdb/gdb/gdbserver/../common/buffer.c:150:9: error: too many arguments for format [-Werror=format-extra-args]
../../../gdb/gdb/gdbserver/../common/buffer.c:153:9: error: unknown conversion type character 'l' in format [-Werror=format]
../../../gdb/gdb/gdbserver/../common/buffer.c:153:9: error: too many arguments for format [-Werror=format-extra-args]
cc1.exe: all warnings being treated as errors
make[4]: *** [buffer.o] Error 1
make[4]: Leaving directory `/f/build_gdb/gdb/gdbgit/newbuild/gdb/gdbserver'
make[3]: *** [subdir_do] Error 1
make[3]: Leaving directory `/f/build_gdb/gdb/gdbgit/newbuild/gdb'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/f/build_gdb/gdb/gdbgit/newbuild/gdb'
make[1]: *** [all-gdb] Error 2
make[1]: Leaving directory `/f/build_gdb/gdb/gdbgit/newbuild'
make: *** [all] Error 2

I see the code change in buffer.c in
Commit:2e01eef6b3e2152435a344c7de3351d4b92525dd

* 2012-05-11  Stan Shebs  <stan@codesourcery.com>
	    Kwok Cheung Yeung  <kcy@codesourcery.com>


It looks like those format: "%lld"


sprintf (str, "%lld", va_arg (ap, long long));

is not supported under MinGW.

By reading this link:
http://cboard.cprogramming.com/cplusplus-programming/118149-long-long-int-gplusplus-mingw.html

It suggest that under MinGW, we should use %I64d

Any ideas?

Thanks

Yuanhui Zhang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]