[binutils-gdb] Revert "gdbsupport: remove unnecessary `#ifndef IN_PROCESS_AGENT`"
Simon Marchi
simark@sourceware.org
Fri Dec 10 00:04:03 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b80a346e3d567b9366a1da123eeae555a44ccf05
commit b80a346e3d567b9366a1da123eeae555a44ccf05
Author: Simon Marchi <simon.marchi@polymtl.ca>
Date: Thu Dec 9 19:02:38 2021 -0500
Revert "gdbsupport: remove unnecessary `#ifndef IN_PROCESS_AGENT`"
This reverts commit fe72c32765e1190c8a17d309fc3a7e1882d6a430.
It turns out it was wrong, libinproctrace.so does build its own
gdbsupport/tdesc.cc. This broke the build:
make[1]: Entering directory '/home/simark/build/binutils-gdb-one-target/gdbserver'
CXXLD libinproctrace.so
/usr/bin/ld: gdbsupport/tdesc-ipa.o: in function `print_xml_feature::visit_pre(target_desc const*)':
/home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:407: undefined reference to `tdesc_architecture_name(target_desc const*)'
/usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:408: undefined reference to `tdesc_architecture_name(target_desc const*)'
/usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:411: undefined reference to `tdesc_osabi_name(target_desc const*)'
/usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:416: undefined reference to `tdesc_compatible_info_list(target_desc const*)'
/usr/bin/ld: /home/simark/src/binutils-gdb/gdbserver/../gdbsupport/tdesc.cc:418: undefined reference to `tdesc_compatible_info_arch_name(std::unique_ptr<tdesc_compatible_info, std::default_delete<tdesc_compatible_info> > const&)'
Diff:
---
gdbsupport/tdesc.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gdbsupport/tdesc.cc b/gdbsupport/tdesc.cc
index b2deea04613..c04f4943fc0 100644
--- a/gdbsupport/tdesc.cc
+++ b/gdbsupport/tdesc.cc
@@ -400,6 +400,7 @@ void print_xml_feature::visit (const tdesc_reg *r)
void print_xml_feature::visit_pre (const target_desc *e)
{
+#ifndef IN_PROCESS_AGENT
add_line ("<?xml version=\"1.0\"?>");
add_line ("<!DOCTYPE target SYSTEM \"gdb-target.dtd\">");
add_line ("<target>");
@@ -417,6 +418,7 @@ void print_xml_feature::visit_pre (const target_desc *e)
for (const auto &c : compatible_list)
add_line ("<compatible>%s</compatible>",
tdesc_compatible_info_arch_name (c));
+#endif
}
void print_xml_feature::visit_post (const target_desc *e)
More information about the Gdb-cvs
mailing list