Include xml-support.h to get a variable declaration
Commit Message
Instead of declaring xml_builtin as an extern variable
in the .c file.
gdb/gdbserver/ChangeLog:
2019-10-07 Christian Biesinger <cbiesinger@google.com>
* server.c (get_features_xml): Remove declaration of xml_builtin
in favor of including xml-support.h.
---
gdb/gdbserver/server.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Comments
>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
Christian> Instead of declaring xml_builtin as an extern variable
Christian> in the .c file.
Christian> gdb/gdbserver/ChangeLog:
Christian> 2019-10-07 Christian Biesinger <cbiesinger@google.com>
Christian> * server.c (get_features_xml): Remove declaration of xml_builtin
Christian> in favor of including xml-support.h.
I don't think we want to include xml-support.h in gdbserver.
Maybe the xml_builtin can be declared somewhere else instead.
It's only defined in generated files according to the comment.
Tom
@@ -45,6 +45,10 @@
#include "gdbsupport/selftest.h"
#include "gdbsupport/scope-exit.h"
+#ifdef USE_XML
+#include "xml-support.h"
+#endif
+
#define require_running_or_return(BUF) \
if (!target_running ()) \
{ \
@@ -920,7 +924,6 @@ get_features_xml (const char *annex)
#ifdef USE_XML
{
- extern const char *const xml_builtin[][2];
int i;
/* Look for the annex. */