From: Mark Wielaard Date: Fri, 25 Aug 2023 21:09:18 +0000 (+0200) Subject: Fix gdb/coffread.c build on 32bit architectures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=91df9a6f810bca02883dae9275715b4960ea02f0;p=binutils-gdb.git Fix gdb/coffread.c build on 32bit architectures The getsymname function tries to emit an error using %ld for an uintptr_t argument. Use PRIxPTR instead. Which works on any architecture for uintptr_t. --- diff --git a/gdb/coffread.c b/gdb/coffread.c index ae7632d49cb..c609c963453 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -1325,7 +1325,7 @@ getsymname (struct internal_syment *symbol_entry) if (symbol_entry->_n._n_n._n_zeroes == 0) { if (symbol_entry->_n._n_n._n_offset > stringtab_length) - error (_("COFF Error: string table offset (%ld) outside string table (length %ld)"), + error (_("COFF Error: string table offset (%" PRIxPTR ") outside string table (length %ld)"), symbol_entry->_n._n_n._n_offset, stringtab_length); result = stringtab + symbol_entry->_n._n_n._n_offset; }