aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-10-09 20:08:13 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-10-16 18:19:14 +0200
commitfec4e896d6834bc6d23b9d666910dce43f2a2184 (patch)
tree59fd7ce6b63f3402f7a230d681240766a5a61586 /gdb/gdbserver
parentcbbbc402e059ee345cb781d3ceb757ae1cc679ee (diff)
downloadgdb-fec4e896d6834bc6d23b9d666910dce43f2a2184.zip
gdb-fec4e896d6834bc6d23b9d666910dce43f2a2184.tar.gz
gdb-fec4e896d6834bc6d23b9d666910dce43f2a2184.tar.bz2
Create xml-builtin.h to declare xml_builtins
xml-builtin.c only has character arrays and no dependencies, so this creates a simple header file for that purpose so that gdbserver can include that instead of re-declaring xml_builtin. Despite the name, feature_to_c.sh is already specific to xml_builtins (it hardcodes the variable name), so making it always output the include for xml-builtin.h seems fine. gdb/ChangeLog: 2019-10-16 Christian Biesinger <cbiesinger@google.com> * Makefile.in: Add xml-builtin.h. * features/feature_to_c.sh: Add an include for xml-builtin.h to ensure that the compiler checks that the types match. * xml-builtin.h: New file. * xml-support.c (fetch_xml_builtin): Add missing const. * xml-support.h: Remove declaration of xml_builtins. gdb/gdbserver/ChangeLog: 2019-10-16 Christian Biesinger <cbiesinger@google.com> * server.c: Include xml-builtin.h. (get_xml_features): Don't declare xml_builtins here. Change-Id: I806ef0851c43ead90b545a11794e41f5e5178436
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/server.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 801a66c..b2213cf 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-16 Christian Biesinger <cbiesinger@google.com>
+
+ * server.c: Include xml-builtin.h.
+ (get_xml_features): Don't declare xml_builtins here.
+
2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
* Makefile.in: Remove references to vec-ipa.o.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 0bfff04..25a2be8 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -41,6 +41,9 @@
#include "gdbsupport/environ.h"
#include "filenames.h"
#include "gdbsupport/pathstuff.h"
+#ifdef USE_XML
+#include "xml-builtin.h"
+#endif
#include "gdbsupport/selftest.h"
#include "gdbsupport/scope-exit.h"
@@ -920,7 +923,6 @@ get_features_xml (const char *annex)
#ifdef USE_XML
{
- extern const char *const xml_builtin[][2];
int i;
/* Look for the annex. */