1 /* XML target description support for GDB.
3 Copyright (C) 2006-2016 Free Software Foundation, Inc.
5 Contributed by CodeSourcery.
7 This file is part of GDB.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include "target-descriptions.h"
25 #include "xml-support.h"
26 #include "xml-tdesc.h"
28 #include "filenames.h"
31 This is just to catch obviously wrong values. */
32 #define MAX_FIELD_SIZE 65536
33 #define MAX_FIELD_BITSIZE (MAX_FIELD_SIZE * TARGET_CHAR_BIT)
34 #define MAX_VECTOR_SIZE 65536
36 #if !defined(HAVE_LIBEXPAT)
38 /* Parse DOCUMENT into a target description. Or don't, since we don't have
41 static struct target_desc
*
42 tdesc_parse_xml (const char *document
, xml_fetch_another fetcher
,
45 static int have_warned
;
50 warning (_("Can not parse XML target description; XML support was "
51 "disabled at compile time"));
57 #else /* HAVE_LIBEXPAT */
59 /* A record of every XML description we have parsed. We never discard
60 old descriptions, because we never discard gdbarches. As long as we
61 have a gdbarch referencing this description, we want to have a copy
62 of it here, so that if we parse the same XML document again we can
63 return the same "struct target_desc *"; if they are not singletons,
64 then we will create unnecessary duplicate gdbarches. See
65 gdbarch_list_lookup_by_info. */
67 struct tdesc_xml_cache
69 const char *xml_document
;
70 struct target_desc
*tdesc
;
72 typedef struct tdesc_xml_cache tdesc_xml_cache_s
;
73 DEF_VEC_O(tdesc_xml_cache_s
);
75 static VEC(tdesc_xml_cache_s
) *xml_cache
;
77 /* Callback data for target description parsing. */
79 struct tdesc_parsing_data
81 /* The target description we are building. */
82 struct target_desc
*tdesc
;
84 /* The target feature we are currently parsing, or last parsed. */
85 struct tdesc_feature
*current_feature
;
87 /* The register number to use for the next register we see, if
88 it does not have its own. This starts at zero. */
91 /* The struct or union we are currently parsing, or last parsed. */
92 struct tdesc_type
*current_type
;
94 /* The byte size of the current struct type, if specified. Zero
96 int current_type_size
;
98 /* Whether the current type is a flags type. */
99 int current_type_is_flags
;
102 /* Handle the end of an <architecture> element and its value. */
105 tdesc_end_arch (struct gdb_xml_parser
*parser
,
106 const struct gdb_xml_element
*element
,
107 void *user_data
, const char *body_text
)
109 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
110 const struct bfd_arch_info
*arch
;
112 arch
= bfd_scan_arch (body_text
);
114 gdb_xml_error (parser
, _("Target description specified unknown "
115 "architecture \"%s\""), body_text
);
116 set_tdesc_architecture (data
->tdesc
, arch
);
119 /* Handle the end of an <osabi> element and its value. */
122 tdesc_end_osabi (struct gdb_xml_parser
*parser
,
123 const struct gdb_xml_element
*element
,
124 void *user_data
, const char *body_text
)
126 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
127 enum gdb_osabi osabi
;
129 osabi
= osabi_from_tdesc_string (body_text
);
130 if (osabi
== GDB_OSABI_UNKNOWN
)
131 warning (_("Target description specified unknown osabi \"%s\""),
134 set_tdesc_osabi (data
->tdesc
, osabi
);
137 /* Handle the end of a <compatible> element and its value. */
140 tdesc_end_compatible (struct gdb_xml_parser
*parser
,
141 const struct gdb_xml_element
*element
,
142 void *user_data
, const char *body_text
)
144 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
145 const struct bfd_arch_info
*arch
;
147 arch
= bfd_scan_arch (body_text
);
148 tdesc_add_compatible (data
->tdesc
, arch
);
151 /* Handle the start of a <target> element. */
154 tdesc_start_target (struct gdb_xml_parser
*parser
,
155 const struct gdb_xml_element
*element
,
156 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
158 char *version
= (char *) xml_find_attribute (attributes
, "version")->value
;
160 if (strcmp (version
, "1.0") != 0)
161 gdb_xml_error (parser
,
162 _("Target description has unsupported version \"%s\""),
166 /* Handle the start of a <feature> element. */
169 tdesc_start_feature (struct gdb_xml_parser
*parser
,
170 const struct gdb_xml_element
*element
,
171 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
173 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
174 char *name
= (char *) xml_find_attribute (attributes
, "name")->value
;
176 data
->current_feature
= tdesc_create_feature (data
->tdesc
, name
);
179 /* Handle the start of a <reg> element. Fill in the optional
180 attributes and attach it to the containing feature. */
183 tdesc_start_reg (struct gdb_xml_parser
*parser
,
184 const struct gdb_xml_element
*element
,
185 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
187 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
188 struct gdb_xml_value
*attrs
= VEC_address (gdb_xml_value_s
, attributes
);
190 char *name
, *group
, *type
;
191 int bitsize
, regnum
, save_restore
;
193 length
= VEC_length (gdb_xml_value_s
, attributes
);
195 name
= (char *) attrs
[ix
++].value
;
196 bitsize
= * (ULONGEST
*) attrs
[ix
++].value
;
198 if (ix
< length
&& strcmp (attrs
[ix
].name
, "regnum") == 0)
199 regnum
= * (ULONGEST
*) attrs
[ix
++].value
;
201 regnum
= data
->next_regnum
;
203 if (ix
< length
&& strcmp (attrs
[ix
].name
, "type") == 0)
204 type
= (char *) attrs
[ix
++].value
;
208 if (ix
< length
&& strcmp (attrs
[ix
].name
, "group") == 0)
209 group
= (char *) attrs
[ix
++].value
;
213 if (ix
< length
&& strcmp (attrs
[ix
].name
, "save-restore") == 0)
214 save_restore
= * (ULONGEST
*) attrs
[ix
++].value
;
218 if (strcmp (type
, "int") != 0
219 && strcmp (type
, "float") != 0
220 && tdesc_named_type (data
->current_feature
, type
) == NULL
)
221 gdb_xml_error (parser
, _("Register \"%s\" has unknown type \"%s\""),
224 tdesc_create_reg (data
->current_feature
, name
, regnum
, save_restore
, group
,
227 data
->next_regnum
= regnum
+ 1;
230 /* Handle the start of a <union> element. Initialize the type and
231 record it with the current feature. */
234 tdesc_start_union (struct gdb_xml_parser
*parser
,
235 const struct gdb_xml_element
*element
,
236 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
238 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
239 char *id
= (char *) xml_find_attribute (attributes
, "id")->value
;
241 data
->current_type
= tdesc_create_union (data
->current_feature
, id
);
242 data
->current_type_size
= 0;
243 data
->current_type_is_flags
= 0;
246 /* Handle the start of a <struct> element. Initialize the type and
247 record it with the current feature. */
250 tdesc_start_struct (struct gdb_xml_parser
*parser
,
251 const struct gdb_xml_element
*element
,
252 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
254 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
255 char *id
= (char *) xml_find_attribute (attributes
, "id")->value
;
256 struct tdesc_type
*type
;
257 struct gdb_xml_value
*attr
;
259 type
= tdesc_create_struct (data
->current_feature
, id
);
260 data
->current_type
= type
;
261 data
->current_type_size
= 0;
262 data
->current_type_is_flags
= 0;
264 attr
= xml_find_attribute (attributes
, "size");
267 ULONGEST size
= * (ULONGEST
*) attr
->value
;
269 if (size
> MAX_FIELD_SIZE
)
271 gdb_xml_error (parser
,
272 _("Struct size %s is larger than maximum (%d)"),
273 pulongest (size
), MAX_FIELD_SIZE
);
275 tdesc_set_struct_size (type
, size
);
276 data
->current_type_size
= size
;
281 tdesc_start_flags (struct gdb_xml_parser
*parser
,
282 const struct gdb_xml_element
*element
,
283 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
285 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
286 char *id
= (char *) xml_find_attribute (attributes
, "id")->value
;
287 ULONGEST size
= * (ULONGEST
*)
288 xml_find_attribute (attributes
, "size")->value
;
289 struct tdesc_type
*type
;
291 if (size
> MAX_FIELD_SIZE
)
293 gdb_xml_error (parser
,
294 _("Flags size %s is larger than maximum (%d)"),
295 pulongest (size
), MAX_FIELD_SIZE
);
297 type
= tdesc_create_flags (data
->current_feature
, id
, size
);
299 data
->current_type
= type
;
300 data
->current_type_size
= 0;
301 data
->current_type_is_flags
= 1;
304 /* Handle the start of a <field> element. Attach the field to the
305 current struct or union. */
308 tdesc_start_field (struct gdb_xml_parser
*parser
,
309 const struct gdb_xml_element
*element
,
310 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
312 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
313 struct gdb_xml_value
*attr
;
314 struct tdesc_type
*field_type
;
315 char *field_name
, *field_type_id
;
318 field_name
= (char *) xml_find_attribute (attributes
, "name")->value
;
320 attr
= xml_find_attribute (attributes
, "type");
322 field_type_id
= (char *) attr
->value
;
324 field_type_id
= NULL
;
326 attr
= xml_find_attribute (attributes
, "start");
329 ULONGEST ul_start
= * (ULONGEST
*) attr
->value
;
331 if (ul_start
> MAX_FIELD_BITSIZE
)
333 gdb_xml_error (parser
,
334 _("Field start %s is larger than maximum (%d)"),
335 pulongest (ul_start
), MAX_FIELD_BITSIZE
);
342 attr
= xml_find_attribute (attributes
, "end");
345 ULONGEST ul_end
= * (ULONGEST
*) attr
->value
;
347 if (ul_end
> MAX_FIELD_BITSIZE
)
349 gdb_xml_error (parser
,
350 _("Field end %s is larger than maximum (%d)"),
351 pulongest (ul_end
), MAX_FIELD_BITSIZE
);
358 if (field_type_id
!= NULL
)
360 if (data
->current_type_is_flags
)
361 gdb_xml_error (parser
, _("Cannot add typed field \"%s\" to flags"),
363 if (data
->current_type_size
!= 0)
364 gdb_xml_error (parser
,
365 _("Explicitly sized type can not "
366 "contain non-bitfield \"%s\""),
369 field_type
= tdesc_named_type (data
->current_feature
, field_type_id
);
370 if (field_type
== NULL
)
371 gdb_xml_error (parser
, _("Field \"%s\" references undefined "
373 field_name
, field_type_id
);
375 tdesc_add_field (data
->current_type
, field_name
, field_type
);
377 else if (start
!= -1 && end
!= -1)
379 struct tdesc_type
*t
= data
->current_type
;
381 if (data
->current_type_is_flags
)
382 tdesc_add_flag (t
, start
, field_name
);
385 if (data
->current_type_size
== 0)
386 gdb_xml_error (parser
,
387 _("Implicitly sized type can "
388 "not contain bitfield \"%s\""),
392 gdb_xml_error (parser
,
393 _("Bitfield \"%s\" goes past "
394 "64 bits (unsupported)"),
397 /* Assume that the bit numbering in XML is "lsb-zero". Most
398 architectures other than PowerPC use this ordering. In
399 the future, we can add an XML tag to indicate "msb-zero"
402 gdb_xml_error (parser
, _("Bitfield \"%s\" has start after end"),
405 if (end
>= data
->current_type_size
* TARGET_CHAR_BIT
)
406 gdb_xml_error (parser
,
407 _("Bitfield \"%s\" does not fit in struct"));
409 tdesc_add_bitfield (t
, field_name
, start
, end
);
413 gdb_xml_error (parser
, _("Field \"%s\" has neither type nor bit position"),
417 /* Handle the start of a <vector> element. Initialize the type and
418 record it with the current feature. */
421 tdesc_start_vector (struct gdb_xml_parser
*parser
,
422 const struct gdb_xml_element
*element
,
423 void *user_data
, VEC(gdb_xml_value_s
) *attributes
)
425 struct tdesc_parsing_data
*data
= (struct tdesc_parsing_data
*) user_data
;
426 struct gdb_xml_value
*attrs
= VEC_address (gdb_xml_value_s
, attributes
);
427 struct tdesc_type
*field_type
;
428 char *id
, *field_type_id
;
431 id
= (char *) attrs
[0].value
;
432 field_type_id
= (char *) attrs
[1].value
;
433 count
= * (ULONGEST
*) attrs
[2].value
;
435 if (count
> MAX_VECTOR_SIZE
)
437 gdb_xml_error (parser
,
438 _("Vector size %s is larger than maximum (%d)"),
439 pulongest (count
), MAX_VECTOR_SIZE
);
442 field_type
= tdesc_named_type (data
->current_feature
, field_type_id
);
443 if (field_type
== NULL
)
444 gdb_xml_error (parser
, _("Vector \"%s\" references undefined type \"%s\""),
447 tdesc_create_vector (data
->current_feature
, id
, field_type
, count
);
450 /* The elements and attributes of an XML target description. */
452 static const struct gdb_xml_attribute field_attributes
[] = {
453 { "name", GDB_XML_AF_NONE
, NULL
, NULL
},
454 { "type", GDB_XML_AF_OPTIONAL
, NULL
, NULL
},
455 { "start", GDB_XML_AF_OPTIONAL
, gdb_xml_parse_attr_ulongest
, NULL
},
456 { "end", GDB_XML_AF_OPTIONAL
, gdb_xml_parse_attr_ulongest
, NULL
},
457 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
460 static const struct gdb_xml_element struct_union_children
[] = {
461 { "field", field_attributes
, NULL
, GDB_XML_EF_REPEATABLE
,
462 tdesc_start_field
, NULL
},
463 { NULL
, NULL
, NULL
, GDB_XML_EF_NONE
, NULL
, NULL
}
466 static const struct gdb_xml_attribute reg_attributes
[] = {
467 { "name", GDB_XML_AF_NONE
, NULL
, NULL
},
468 { "bitsize", GDB_XML_AF_NONE
, gdb_xml_parse_attr_ulongest
, NULL
},
469 { "regnum", GDB_XML_AF_OPTIONAL
, gdb_xml_parse_attr_ulongest
, NULL
},
470 { "type", GDB_XML_AF_OPTIONAL
, NULL
, NULL
},
471 { "group", GDB_XML_AF_OPTIONAL
, NULL
, NULL
},
472 { "save-restore", GDB_XML_AF_OPTIONAL
,
473 gdb_xml_parse_attr_enum
, gdb_xml_enums_boolean
},
474 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
477 static const struct gdb_xml_attribute struct_union_attributes
[] = {
478 { "id", GDB_XML_AF_NONE
, NULL
, NULL
},
479 { "size", GDB_XML_AF_OPTIONAL
, gdb_xml_parse_attr_ulongest
, NULL
},
480 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
483 static const struct gdb_xml_attribute flags_attributes
[] = {
484 { "id", GDB_XML_AF_NONE
, NULL
, NULL
},
485 { "size", GDB_XML_AF_NONE
, gdb_xml_parse_attr_ulongest
, NULL
},
486 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
489 static const struct gdb_xml_attribute vector_attributes
[] = {
490 { "id", GDB_XML_AF_NONE
, NULL
, NULL
},
491 { "type", GDB_XML_AF_NONE
, NULL
, NULL
},
492 { "count", GDB_XML_AF_NONE
, gdb_xml_parse_attr_ulongest
, NULL
},
493 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
496 static const struct gdb_xml_attribute feature_attributes
[] = {
497 { "name", GDB_XML_AF_NONE
, NULL
, NULL
},
498 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
501 static const struct gdb_xml_element feature_children
[] = {
502 { "reg", reg_attributes
, NULL
,
503 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
504 tdesc_start_reg
, NULL
},
505 { "struct", struct_union_attributes
, struct_union_children
,
506 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
507 tdesc_start_struct
, NULL
},
508 { "union", struct_union_attributes
, struct_union_children
,
509 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
510 tdesc_start_union
, NULL
},
511 { "flags", flags_attributes
, struct_union_children
,
512 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
513 tdesc_start_flags
, NULL
},
514 { "vector", vector_attributes
, NULL
,
515 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
516 tdesc_start_vector
, NULL
},
517 { NULL
, NULL
, NULL
, GDB_XML_EF_NONE
, NULL
, NULL
}
520 static const struct gdb_xml_attribute target_attributes
[] = {
521 { "version", GDB_XML_AF_NONE
, NULL
, NULL
},
522 { NULL
, GDB_XML_AF_NONE
, NULL
, NULL
}
525 static const struct gdb_xml_element target_children
[] = {
526 { "architecture", NULL
, NULL
, GDB_XML_EF_OPTIONAL
,
527 NULL
, tdesc_end_arch
},
528 { "osabi", NULL
, NULL
, GDB_XML_EF_OPTIONAL
,
529 NULL
, tdesc_end_osabi
},
530 { "compatible", NULL
, NULL
, GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
531 NULL
, tdesc_end_compatible
},
532 { "feature", feature_attributes
, feature_children
,
533 GDB_XML_EF_OPTIONAL
| GDB_XML_EF_REPEATABLE
,
534 tdesc_start_feature
, NULL
},
535 { NULL
, NULL
, NULL
, GDB_XML_EF_NONE
, NULL
, NULL
}
538 static const struct gdb_xml_element tdesc_elements
[] = {
539 { "target", target_attributes
, target_children
, GDB_XML_EF_NONE
,
540 tdesc_start_target
, NULL
},
541 { NULL
, NULL
, NULL
, GDB_XML_EF_NONE
, NULL
, NULL
}
544 /* Parse DOCUMENT into a target description and return it. */
546 static struct target_desc
*
547 tdesc_parse_xml (const char *document
, xml_fetch_another fetcher
,
550 struct cleanup
*back_to
, *result_cleanup
;
551 struct tdesc_parsing_data data
;
552 struct tdesc_xml_cache
*cache
;
556 /* Expand all XInclude directives. */
557 expanded_text
= xml_process_xincludes (_("target description"),
558 document
, fetcher
, fetcher_baton
, 0);
559 if (expanded_text
== NULL
)
561 warning (_("Could not load XML target description; ignoring"));
565 /* Check for an exact match in the list of descriptions we have
566 previously parsed. strcmp is a slightly inefficient way to
567 do this; an SHA-1 checksum would work as well. */
568 for (ix
= 0; VEC_iterate (tdesc_xml_cache_s
, xml_cache
, ix
, cache
); ix
++)
569 if (strcmp (cache
->xml_document
, expanded_text
) == 0)
571 xfree (expanded_text
);
575 back_to
= make_cleanup (null_cleanup
, NULL
);
577 memset (&data
, 0, sizeof (struct tdesc_parsing_data
));
578 data
.tdesc
= allocate_target_description ();
579 result_cleanup
= make_cleanup_free_target_description (data
.tdesc
);
580 make_cleanup (xfree
, expanded_text
);
582 if (gdb_xml_parse_quick (_("target description"), "gdb-target.dtd",
583 tdesc_elements
, expanded_text
, &data
) == 0)
585 /* Parsed successfully. */
586 struct tdesc_xml_cache new_cache
;
588 new_cache
.xml_document
= expanded_text
;
589 new_cache
.tdesc
= data
.tdesc
;
590 VEC_safe_push (tdesc_xml_cache_s
, xml_cache
, &new_cache
);
591 discard_cleanups (result_cleanup
);
592 do_cleanups (back_to
);
597 warning (_("Could not load XML target description; ignoring"));
598 do_cleanups (back_to
);
602 #endif /* HAVE_LIBEXPAT */
605 /* Read an XML target description from FILENAME. Parse it, and return
606 the parsed description. */
608 const struct target_desc
*
609 file_read_description_xml (const char *filename
)
611 struct target_desc
*tdesc
;
613 struct cleanup
*back_to
;
616 tdesc_str
= xml_fetch_content_from_file (filename
, NULL
);
617 if (tdesc_str
== NULL
)
619 warning (_("Could not open \"%s\""), filename
);
623 back_to
= make_cleanup (xfree
, tdesc_str
);
625 dirname
= ldirname (filename
);
627 make_cleanup (xfree
, dirname
);
629 tdesc
= tdesc_parse_xml (tdesc_str
, xml_fetch_content_from_file
, dirname
);
630 do_cleanups (back_to
);
635 /* Read a string representation of available features from the target,
636 using TARGET_OBJECT_AVAILABLE_FEATURES. The returned string is
637 malloc allocated and NUL-terminated. NAME should be a non-NULL
638 string identifying the XML document we want; the top level document
639 is "target.xml". Other calls may be performed for the DTD or
643 fetch_available_features_from_target (const char *name
, void *baton_
)
645 struct target_ops
*ops
= (struct target_ops
*) baton_
;
647 /* Read this object as a string. This ensures that a NUL
648 terminator is added. */
649 return target_read_stralloc (ops
,
650 TARGET_OBJECT_AVAILABLE_FEATURES
,
655 /* Read an XML target description using OPS. Parse it, and return the
656 parsed description. */
658 const struct target_desc
*
659 target_read_description_xml (struct target_ops
*ops
)
661 struct target_desc
*tdesc
;
663 struct cleanup
*back_to
;
665 tdesc_str
= fetch_available_features_from_target ("target.xml", ops
);
666 if (tdesc_str
== NULL
)
669 back_to
= make_cleanup (xfree
, tdesc_str
);
670 tdesc
= tdesc_parse_xml (tdesc_str
,
671 fetch_available_features_from_target
,
673 do_cleanups (back_to
);
678 /* Fetches an XML target description using OPS, processing
679 includes, but not parsing it. Used to dump whole tdesc
680 as a single XML file. */
683 target_fetch_description_xml (struct target_ops
*ops
)
685 #if !defined(HAVE_LIBEXPAT)
686 static int have_warned
;
691 warning (_("Can not fetch XML target description; XML support was "
692 "disabled at compile time"));
697 struct target_desc
*tdesc
;
700 struct cleanup
*back_to
;
702 tdesc_str
= fetch_available_features_from_target ("target.xml", ops
);
703 if (tdesc_str
== NULL
)
706 back_to
= make_cleanup (xfree
, tdesc_str
);
707 expanded_text
= xml_process_xincludes (_("target description"),
709 fetch_available_features_from_target
, ops
, 0);
710 do_cleanups (back_to
);
711 if (expanded_text
== NULL
)
713 warning (_("Could not load XML target description; ignoring"));
717 return expanded_text
;