diff options
Diffstat (limited to 'gdb/xml-tdesc.h')
-rw-r--r-- | gdb/xml-tdesc.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/xml-tdesc.h b/gdb/xml-tdesc.h index 1637a89..2375395 100644 --- a/gdb/xml-tdesc.h +++ b/gdb/xml-tdesc.h @@ -19,6 +19,12 @@ 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_TDESC_H +#define XML_TDESC_H + +#include "common/gdb_optional.h" +#include <string> + struct target_ops; struct target_desc; @@ -32,8 +38,11 @@ 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<std::string> target_fetch_description_xml (target_ops *ops); + +#endif /* XML_TDESC_H */ -char *target_fetch_description_xml (struct target_ops *ops); |