X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fxml-tdesc.h;h=0bb32ff619f0375a56b050d432f73e07d2aa37ac;hb=a435742a7fb32f6320ce0e6074e2500e28378104;hp=1637a899c24d160a93d0ed4200e6c5397fee8e33;hpb=61baf725eca99af2569262d10aca03dcde2698f6;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/xml-tdesc.h b/gdb/xml-tdesc.h index 1637a899c2..0bb32ff619 100644 --- a/gdb/xml-tdesc.h +++ b/gdb/xml-tdesc.h @@ -1,6 +1,6 @@ /* XML target description support for GDB. - Copyright (C) 2006-2017 Free Software Foundation, Inc. + Copyright (C) 2006-2020 Free Software Foundation, Inc. Contributed by CodeSourcery. @@ -19,6 +19,12 @@ You should have received a copy of the GNU General Public License 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; @@ -32,8 +38,16 @@ const struct target_desc *file_read_description_xml (const char *filename); 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. */ +/* 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 */ -char *target_fetch_description_xml (struct target_ops *ops);