binutils-gdb/gdbsupport
Vyacheslav Petrishchev 3d1e5a43cb gdbsupport/configure.ac: source development.sh
[Commit message by Simon Marchi]

The GDB build in non-development mode (turn development to false in
bfd/development.sh if you want to try) is currently broken:

      CXXLD  gdb
    /home/smarchi/src/binutils-gdb/gdb/disasm-selftests.c:218: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
    /home/smarchi/src/binutils-gdb/gdb/disasm-selftests.c:220: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
    /home/smarchi/src/binutils-gdb/gdb/dwarf2/frame.c:2310: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
    /home/smarchi/src/binutils-gdb/gdb/gdbarch-selftests.c:168: error: undefined reference to 'selftests::register_test_foreach_arch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void (*)(gdbarch*))'
    /home/smarchi/src/binutils-gdb/gdbsupport/selftest.cc:96: error: undefined reference to 'selftests::reset()'

This is because the gdbsupport configure script doesn't source
bfd/development.sh to set the development variable.  When $development
is unset, GDB_AC_SELFTEST defaults to enabling selftests.  I don't think
the macro was written with this intention in mind, it just happens to be
that way.

So gdbsupport thinks selftests are enabled, while gdb thinks they are
disabled.  gdbsupport compiles in code that calls selftests:: functions,
which are normally provided by gdb, but gdb doesn't provide them, hence
the undefined references.

Fix this by sourcing bfd/development.sh in gdbsupport/configure.ac, so
that the development variable is set.

gdbsupport/ChangeLog:

        * configure.ac: Added call development.sh.
        * configure: Regenerate.
2020-03-05 14:33:17 -05:00
..
.gitattributes gdb, gdbserver, gdbsupport: add .gitattributes files 2020-03-05 15:59:22 +01:00
ChangeLog gdbsupport/configure.ac: source development.sh 2020-03-05 14:33:17 -05:00
Makefile.am gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
Makefile.in gdbsupport: re-generate Makefile.in 2020-03-03 17:11:12 -05:00
README
acinclude.m4 Move gdb/warning.m4 to gdbsupport 2020-02-11 10:51:43 -05:00
aclocal.m4
agent.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
agent.h
alt-stack.h
array-view.h
ax.def
block-signals.h
break-common.h
btrace-common.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
btrace-common.h
buffer.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
buffer.h
byte-vector.h
check-defines.el Add gdbsupport check-defines script 2020-01-14 16:25:04 -07:00
cleanups.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
cleanups.h
common-debug.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-debug.h
common-defs.h Change gdbserver to use existing gnulib and libiberty 2020-02-14 14:34:20 -07:00
common-exceptions.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-exceptions.h
common-gdbthread.h
common-inferior.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-inferior.h
common-regcache.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-regcache.h
common-types.h
common-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
common-utils.h
common.m4
config.in
configure gdbsupport/configure.ac: source development.sh 2020-03-05 14:33:17 -05:00
configure.ac gdbsupport/configure.ac: source development.sh 2020-03-05 14:33:17 -05:00
create-version.sh
def-vector.h
default-init-alloc.h
enum-flags.h
environ.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
environ.h
errors.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
errors.h
fileio.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
fileio.h
filestuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
filestuff.h
filtered-iterator.h
format.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
format.h
forward-scope-exit.h
function-view.h
gdb-dlfcn.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb-dlfcn.h Fix comment for 'gdb_dlopen' 2020-02-28 11:04:28 -05:00
gdb-sigmask.h
gdb_assert.h
gdb_binary_search.h
gdb_locale.h
gdb_optional.h
gdb_proc_service.h Ensure proc-service symbols have default visibility (PR build/24805) 2020-01-16 19:14:14 +00:00
gdb_ref_ptr.h
gdb_setjmp.h
gdb_signals.h
gdb_splay_tree.h
gdb_string_view.h
gdb_string_view.tcc
gdb_sys_time.h
gdb_tilde_expand.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_tilde_expand.h
gdb_unique_ptr.h
gdb_unlinker.h
gdb_vecs.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_vecs.h
gdb_wait.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
gdb_wait.h
hash_enum.h
host-defs.h
job-control.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
job-control.h
netstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
netstuff.h
new-op.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
next-iterator.h
observable.h
offset-type.h
parallel-for.h
pathstuff.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
pathstuff.h
poison.h
preprocessor.h
print-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
print-utils.h
ptid.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
ptid.h
refcounted-object.h
rsp-low.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
rsp-low.h
run-time-clock.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
run-time-clock.h
safe-iterator.h
safe-strerror.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scope-exit.h
scoped_fd.h
scoped_mmap.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
scoped_mmap.h
scoped_restore.h
selftest.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
selftest.h
signals-state-save-restore.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
signals-state-save-restore.h
signals.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
symbol.h
tdesc.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
tdesc.h
thread-pool.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
thread-pool.h
traits.h
underlying.h
valid-expr.h
version.h
warning.m4 Add -Wstrict-null-sentinel to gdbsupport/warning.m4 2020-02-11 10:51:49 -05:00
x86-xstate.h
xml-utils.cc gdbsupport: rename source files to .cc 2020-02-13 16:27:03 -05:00
xml-utils.h

README

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.