binutils-gdb/gdbsupport
Tom de Vries 0e8dbf5c5d [gdb/build] Work around GCC ipa-modref bug
PR mi/32571 reports the following problem:
...
$ gdb -q -batch -ex "b bla.c:100"
<random output>
Make breakpoint pending on future shared library load? (y or [n]) \
  [answered N; input not from terminal]
...
while this is expected:
...
$ gdb -q -batch -ex "b bla.c:100"
No symbol table is loaded.  Use the "file" command.
Make breakpoint pending on future shared library load? (y or [n]) \
  [answered N; input not from terminal]
...

A few factors in reproducing this are building gdb using gcc 14,
"-O2 -flto=auto" and --disable-nls.  For more details, see the PR.

This turns out to be caused by a GCC PR [1], more specifically a problem in
ipa-modref.

Work around this by disabling ipa-modref for GCC versions 12-15 and 16.0,
assuming the GCC 16.1 release will contain a fix.

Tested on aarch64-linux and x86_64-linux.

Approved-By: Andrew Burgess <aburgess@redhat.com>

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32571

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120987
2025-07-13 07:25:43 +02:00
..
.dir-locals.el Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
.gitattributes gdb, gdbserver, gdbsupport: add .gitattributes files 2020-03-05 15:59:22 +01:00
acinclude.m4 gdb: move libiberty.m4 to gdbsupport 2024-01-10 19:52:52 -05:00
aclocal.m4 [gdbsupport] Rerun autoreconf -f 2024-11-23 12:40:36 +01:00
agent.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
agent.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
alt-stack.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
array-view.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
ax.def Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
block-signals.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
break-common.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
btrace-common.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
btrace-common.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
buildargv.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
byte-vector.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
ChangeLog-2020-2021 gdb: move remaining ChangeLogs to legacy files 2021-07-26 12:20:33 +01:00
check-defines.el Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
cleanups.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
cleanups.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-debug.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-debug.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-defs.h [gdb/build] Work around GCC ipa-modref bug 2025-07-13 07:25:43 +02:00
common-exceptions.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-exceptions.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-gdbthread.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-inferior.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-inferior.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-regcache.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-regcache.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-types.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-utils.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
common-utils.h Introduce attribute::signed_constant 2025-04-24 13:25:08 -06:00
common.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
compiler-type.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
config.in [gdb/build] Fix build breaker on mingw-w64 2024-12-04 21:29:52 +01:00
configure gdbsupport: add some -Wunused-* warning flags 2025-03-17 16:14:08 -04:00
configure.ac Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
create-version.sh Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
def-vector.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
default-init-alloc.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
eintr.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
enum-flags.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
environ.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
environ.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
errors.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
errors.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
event-loop.cc gdbsupport/event-loop: do not truncate poll timeouts to lower second 2025-05-12 17:47:35 +02:00
event-loop.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
event-pipe.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
event-pipe.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
fileio.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
fileio.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
filestuff.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
filestuff.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
filtered-iterator.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
format.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
format.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
forward-scope-exit.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
function-view.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-checked-static-cast.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-dlfcn.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-dlfcn.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-hashtab.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-safe-ctype.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-sigmask.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb-xfree.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_argv_vec.h gdbserver: introduce and use new gdb::argv_vec class 2025-01-29 09:46:15 +00:00
gdb_assert.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_binary_search.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_file.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_locale.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_obstack.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_obstack.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_proc_service.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_ref_ptr.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_regex.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_regex.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_select.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_setjmp.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_signals.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_splay_tree.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_sys_time.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_tilde_expand.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_tilde_expand.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_unique_ptr.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_unlinker.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_vecs.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_vecs.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_wait.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
gdb_wait.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
host-defs.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
intrusive_list.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
iterator-range.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
job-control.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
job-control.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
libiberty.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
Makefile.am gdb: move remote arg splitting and joining into gdbsupport/ 2025-04-24 16:45:51 +01:00
Makefile.in gdb: move remote arg splitting and joining into gdbsupport/ 2025-04-24 16:45:51 +01:00
netstuff.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
netstuff.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
new-op.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
next-iterator.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
observable.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
offset-type.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
osabi.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
osabi.def Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
osabi.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
owning_intrusive_list.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
packed.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
parallel-for.h gdbsupport: make gdb::parallel_for_each's n parameter a template parameter 2025-06-13 14:38:57 -04:00
pathstuff.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
pathstuff.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
poison.h gdb, gdbsupport: fix all ;; instances 2025-05-29 11:13:08 -04:00
preprocessor.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
print-utils.cc gdbsupport: Use xsnprintf() instead of strcat() in print-utils 2025-06-20 20:11:03 +01:00
print-utils.h [gdbsupport] Reimplement phex and phex_nz as templates 2025-05-02 22:10:53 +02:00
ptid.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
ptid.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
ptrace.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
range-chain.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
README
refcounted-object.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
reference-to-pointer-iterator.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
remote-args.cc gdb: move remote arg splitting and joining into gdbsupport/ 2025-04-24 16:45:51 +01:00
remote-args.h gdbsupport: add missing include guard to remote-args.h 2025-04-24 15:36:23 -04:00
rsp-low.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
rsp-low.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
run-time-clock.cc Fix build when RUSAGE_THREAD is not available & add warning 2025-05-29 11:08:43 -04:00
run-time-clock.h Fix build when RUSAGE_THREAD is not available & add warning 2025-05-29 11:08:43 -04:00
safe-iterator.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
safe-strerror.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scope-exit.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_fd.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_ignore_signal.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_ignore_sigttou.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_mmap.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_mmap.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_restore.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
scoped_signal_handler.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
search.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
search.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
selftest.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
selftest.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
selftest.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
signals-state-save-restore.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
signals-state-save-restore.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
signals.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
string-set.h Use correct types in string-set.h 2025-03-12 14:23:50 -06:00
symbol.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
task-group.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
task-group.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
tdesc.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
tdesc.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
thread-pool.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
thread-pool.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
traits.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
underlying.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
unordered_dense.h gdb, gdbserver, gdbsupport: fix some namespace comment formatting 2025-02-27 21:35:38 -05:00
unordered_map.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
unordered_set.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
valid-expr.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
version.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
warning.m4 Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
x86-xstate.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
xml-utils.cc Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00
xml-utils.h Update copyright dates to include 2025 2025-04-08 10:54:39 -06:00

This is a helper library that is used by gdb and gdbserver.

To send patches, follow the gdb patch submission instructions in
../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.