diff options
author | Pedro Alves <palves@redhat.com> | 2013-05-23 18:31:29 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2013-05-23 18:31:29 +0000 |
commit | 21aa081e21da472e1e470d57770953c5e5c01477 (patch) | |
tree | faad314462f8c5ea4341b5e92493651e8cb94f10 /gdb/filesystem.h | |
parent | bc5065a70f840e8f0b0aaddfb0d99464e2c8771d (diff) | |
download | gdb-21aa081e21da472e1e470d57770953c5e5c01477.zip gdb-21aa081e21da472e1e470d57770953c5e5c01477.tar.gz gdb-21aa081e21da472e1e470d57770953c5e5c01477.tar.bz2 |
dwarf2read.c: Don't assume uint32_t is unsigned int on all hosts.
Building gdb on GNU/Linux, for --host=i586-pc-msdosdjgpp, I get:
../../src/gdb/dwarf2read.c: In function 'create_dwp_hash_table':
../../src/gdb/dwarf2read.c:8626:7: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' [-Werror=format]
../../src/gdb/dwarf2read.c:8632:7: error: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'uint32_t' [-Werror=format]
../../src/gdb/dwarf2read.c: In function 'create_dwo_in_dwp':
../../src/gdb/dwarf2read.c:8754:6: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'uint32_t' [-Werror=format]
../../src/gdb/dwarf2read.c: In function 'open_and_init_dwp_file':
../../src/gdb/dwarf2read.c:9248:6: error: format '%u' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Werror=format]
../../src/gdb/dwarf2read.c:9248:6: error: format '%u' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Werror=format]
And:
$ grep uint32_t /usr/i586-pc-msdosdjgpp/sys-include/*
/usr/i586-pc-msdosdjgpp/sys-include/stdint.h:typedef unsigned long uint32_t;
As decided on the discussion at
<http://sourceware.org/ml/gdb-patches/2013-05/msg00788.html>, use
pulongest rather than PRIu32.
Tested on F17. Also confirmed GDB still builds OK with
--host=i686-w64-mingw32.
gdb/
2013-05-23 Pedro Alves <palves@redhat.com>
* dwarf2read.c (create_dwp_hash_table, create_dwo_in_dwp)
(open_and_init_dwp_file): Use %s/pulongest instead of %u for
printing uint32_t variables.
Diffstat (limited to 'gdb/filesystem.h')
0 files changed, 0 insertions, 0 deletions