+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.
+
2019-10-16 Tom de Vries <tdevries@suse.de>
PR tdep/25096
x86-linux-nat.h \
x86-nat.h \
xcoffread.h \
+ xml-builtin.h \
xml-support.h \
xml-syscall.h \
xml-tdesc.h \
exit 1
fi
+echo '#include "xml-builtin.h"' >> $output
+
for input; do
arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`
+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.
#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"
#ifdef USE_XML
{
- extern const char *const xml_builtin[][2];
int i;
/* Look for the annex. */
--- /dev/null
+/* Header file for builtin XML files.
+
+ Copyright (C) 2019 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XML_BUILTIN_H
+#define XML_BUILTIN_H
+
+/* The text of compiled-in XML documents, from xml-builtin.c
+ (generated). */
+
+extern const char *const xml_builtin[][2];
+
+#endif /* XML_BUILTIN_H */
#include "defs.h"
#include "gdbcmd.h"
+#include "xml-builtin.h"
#include "xml-support.h"
#include "gdbsupport/filestuff.h"
#include "safe-ctype.h"
const char *
fetch_xml_builtin (const char *filename)
{
- const char *(*p)[2];
+ const char *const (*p)[2];
for (p = xml_builtin; (*p)[0]; p++)
if (strcmp ((*p)[0], filename) == 0)
gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len);
-/* The text of compiled-in XML documents, from xml-builtin.c
- (generated). */
-
-extern const char *xml_builtin[][2];
-
/* Support for XInclude. */
/* Callback to fetch a new XML file, based on the provided HREF. */