sim: drop unused gentmap & nltvals.def logic
[binutils-gdb.git] / gdbsupport / tdesc.h
index 456e8e070b1230dc030cb90ed7cf68fcb5cba690..7fe1e1facfb81a23ba0a7a90eb45608dbc522cfc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -173,6 +173,7 @@ enum tdesc_type_kind
   TDESC_TYPE_IEEE_DOUBLE,
   TDESC_TYPE_ARM_FPA_EXT,
   TDESC_TYPE_I387_EXT,
+  TDESC_TYPE_BFLOAT16,
 
   /* Types defined by a target feature.  */
   TDESC_TYPE_VECTOR,
@@ -312,8 +313,22 @@ struct tdesc_feature : tdesc_element
 
 typedef std::unique_ptr<tdesc_feature> tdesc_feature_up;
 
+/* A deleter adapter for a target_desc.  There are different
+   implementations of this deleter class in gdb and gdbserver because even
+   though the target_desc name is shared between the two projects, the
+   actual implementations of target_desc are completely different.  */
+
+struct target_desc_deleter
+{
+  void operator() (struct target_desc *desc) const;
+};
+
+/* A unique pointer specialization that holds a target_desc.  */
+
+typedef std::unique_ptr<target_desc, target_desc_deleter> target_desc_up;
+
 /* Allocate a new target_desc.  */
-target_desc *allocate_target_description (void);
+target_desc_up allocate_target_description (void);
 
 /* Set TARGET_DESC's architecture by NAME.  */
 void set_tdesc_architecture (target_desc *target_desc,