Create xml from target descriptions
[deliverable/binutils-gdb.git] / gdb / gdbserver / tdesc.h
index 197fb5912753af3d84ff568b8689af0a40c41265..61a3e4ecdd2ce5fbbca2e0f196bb3243c7d55b47 100644 (file)
@@ -27,7 +27,7 @@
 /* A target description.  Inherit from tdesc_feature so that target_desc
    can be used as tdesc_feature.  */
 
-struct target_desc
+struct target_desc : tdesc_element
 {
   /* A vector of elements of register definitions that
      describe the inferior's register set.  */
@@ -49,9 +49,9 @@ struct target_desc
      verbatim XML code (prefixed with a '@') or else the name of the
      actual XML file to be used in place of "target.xml".
 
-     It can be NULL, then, its content is got from the following three
-     fields features, arch, and osabi in tdesc_get_features_xml.  */
-  const char *xmltarget = NULL;
+     If NULL then its content will be generated by parsing the target
+     description into xml.  */
+  mutable const char *xmltarget = NULL;
 
   /* The value of <architecture> element in the XML, replying GDB.  */
   const char *arch = NULL;
@@ -73,6 +73,8 @@ public:
     return !(*this == other);
   }
 #endif
+
+  void accept (tdesc_element_visitor &v) const override;
 };
 
 /* Copy target description SRC to DEST.  */
@@ -89,8 +91,4 @@ void init_target_desc (struct target_desc *tdesc);
 
 const struct target_desc *current_target_desc (void);
 
-#ifndef IN_PROCESS_AGENT
-const char *tdesc_get_features_xml (struct target_desc *tdesc);
-#endif
-
 #endif /* TDESC_H */
This page took 0.027547 seconds and 4 git commands to generate.