X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fxml-tdesc.h;h=0bb32ff619f0375a56b050d432f73e07d2aa37ac;hb=f1f28025c3ea75d5368ddd3046461648145b89b3;hp=0f2a9d8379a820e82dcdbfb1f47f8affd14e08c5;hpb=23181151a2399f4ecbc272cda73172a078d1b435;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/xml-tdesc.h b/gdb/xml-tdesc.h index 0f2a9d8379..0bb32ff619 100644 --- a/gdb/xml-tdesc.h +++ b/gdb/xml-tdesc.h @@ -1,7 +1,6 @@ /* XML target description support for GDB. - Copyright (C) 2006 - Free Software Foundation, Inc. + Copyright (C) 2006-2020 Free Software Foundation, Inc. Contributed by CodeSourcery. @@ -9,7 +8,7 @@ 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 2 of the License, or + 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, @@ -18,9 +17,13 @@ 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ + +#ifndef XML_TDESC_H +#define XML_TDESC_H + +#include "gdbsupport/gdb_optional.h" +#include struct target_ops; struct target_desc; @@ -34,3 +37,17 @@ const struct target_desc *file_read_description_xml (const char *filename); parsed description. */ const struct target_desc *target_read_description_xml (struct target_ops *); + +/* Fetches an XML target description using OPS, processing includes, + but not parsing it. Used to dump whole tdesc as a single XML file. + Returns the description on success, and a disengaged optional + otherwise. */ +gdb::optional target_fetch_description_xml (target_ops *ops); + +/* Take an xml string, parse it, and return the parsed description. Does not + handle a string containing includes. */ + +const struct target_desc *string_read_description_xml (const char *xml); + +#endif /* XML_TDESC_H */ +