diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-10-09 20:08:13 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-10-16 18:19:14 +0200 |
commit | fec4e896d6834bc6d23b9d666910dce43f2a2184 (patch) | |
tree | 59fd7ce6b63f3402f7a230d681240766a5a61586 /gdb/xml-builtin.h | |
parent | cbbbc402e059ee345cb781d3ceb757ae1cc679ee (diff) | |
download | gdb-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/xml-builtin.h')
-rw-r--r-- | gdb/xml-builtin.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/xml-builtin.h b/gdb/xml-builtin.h new file mode 100644 index 0000000..972417d --- /dev/null +++ b/gdb/xml-builtin.h @@ -0,0 +1,28 @@ +/* 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 */ |