/* See arch/tdesc.h. */
struct tdesc_feature *
-tdesc_create_feature (struct target_desc *tdesc, const char *name)
+tdesc_create_feature (struct target_desc *tdesc, const char *name,
+ const char *xml)
{
struct tdesc_feature *new_feature = new tdesc_feature (name);
VEC_safe_push (property_s, target_desc->properties, &new_prop);
}
+/* See arch/tdesc.h. */
+
+void
+set_tdesc_architecture (struct target_desc *target_desc,
+ const char *name)
+{
+ set_tdesc_architecture (target_desc, bfd_scan_arch (name));
+}
+
void
set_tdesc_architecture (struct target_desc *target_desc,
const struct bfd_arch_info *arch)
target_desc->arch = arch;
}
+/* See arch/tdesc.h. */
+
+void
+set_tdesc_osabi (struct target_desc *target_desc, const char *name)
+{
+ set_tdesc_osabi (target_desc, osabi_from_tdesc_string (name));
+}
+
void
set_tdesc_osabi (struct target_desc *target_desc, enum gdb_osabi osabi)
{
printf_unfiltered ("{\n");
printf_unfiltered (" struct tdesc_feature *feature;\n");
- printf_unfiltered ("\n feature = tdesc_create_feature (result, \"%s\");\n",
- e->name);
+
+ printf_unfiltered
+ ("\n feature = tdesc_create_feature (result, \"%s\", \"%s\");\n",
+ e->name, lbasename (m_filename_after_features.c_str ()));
}
void visit_post (const tdesc_feature *e) override
/* Print c files for target features instead of target descriptions,
because c files got from target features are more flexible than the
counterparts. */
- if (startswith (filename_after_features.c_str (), "i386/32bit-"))
+ if (startswith (filename_after_features.c_str (), "i386/32bit-")
+ || startswith (filename_after_features.c_str (), "i386/64bit-")
+ || startswith (filename_after_features.c_str (), "i386/x32-core.xml"))
{
print_c_feature v (filename_after_features);