aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2022-11-18 10:48:03 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2022-11-18 10:48:03 -0500
commit9c48a8e6f43965b8d530159e5dbb2fc9d6083646 (patch)
tree5c4fbc2aab034d81a125f005ad9d094500761f8f /gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.c
parentf9f88aede3bb84efd088a59a5f6bccb3a6bb6516 (diff)
downloadbinutils-9c48a8e6f43965b8d530159e5dbb2fc9d6083646.zip
binutils-9c48a8e6f43965b8d530159e5dbb2fc9d6083646.tar.gz
binutils-9c48a8e6f43965b8d530159e5dbb2fc9d6083646.tar.bz2
gdb: fix symtab.c build on 32 bit targets
When building on Ubuntu 22.04, gcc 12, x86-64 with -m32 and -O2, I get: CXX symtab.o /home/smarchi/src/binutils-gdb/gdb/symtab.c: In member function ‘std::vector<symbol_search> global_symbol_searcher::search() const’: /home/smarchi/src/binutils-gdb/gdb/symtab.c:4961:44: error: ‘__builtin___sprintf_chk’ may write a terminating nul past the end of the destination [-Werror=format-overflow=] 4961 | sprintf (tmp, "operator%.*s%s", fix, " ", opname); | ^ In file included from /usr/include/stdio.h:894, from ../gnulib/import/stdio.h:43, from /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/common-defs.h:86, from /home/smarchi/src/binutils-gdb/gdb/defs.h:28, from /home/smarchi/src/binutils-gdb/gdb/symtab.c:20: In function ‘int sprintf(char*, const char*, ...)’, inlined from ‘std::vector<symbol_search> global_symbol_searcher::search() const’ at /home/smarchi/src/binutils-gdb/gdb/symtab.c:4961:16: /usr/include/i386-linux-gnu/bits/stdio2.h:38:34: note: ‘__builtin___sprintf_chk’ output between 9 and 2147483648 bytes into a destination of size 2147483647 38 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1, | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | __glibc_objsize (__s), __fmt, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | __va_arg_pack ()); | ~~~~~~~~~~~~~~~~~ PR build/29798 shows a similar error message but on Solaris. Work around that by using string_printf. It is a good thing to get rid of the alloca anyway. Change-Id: Ifbac11fee3062ad7f134d596b4e2229dc5d166f9 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29798
Diffstat (limited to 'gdb/testsuite/gdb.python/py-finish-breakpoint-deletion.c')
0 files changed, 0 insertions, 0 deletions