Automatic date update in version.in
[deliverable/binutils-gdb.git] / include / ctf-api.h
index f221d17f33e6b003a56abbba3a5efd5eed31b639..fa8f2cd5b684b7238b65c9a1cf2b9ed289347cfd 100644 (file)
@@ -94,7 +94,8 @@ typedef struct ctf_link_sym
 /* Share only types that are used by multiple inputs.  */
 #define CTF_LINK_SHARE_DUPLICATED 0x1
 
-/* Do a nondeduplicating link.  */
+/* Do a nondeduplicating link, or otherwise deduplicate "less hard", trading off
+   CTF output size for link time.  */
 #define CTF_LINK_NONDEDUP 0x2
 
 /* Create empty outputs for all registered CU mappings even if no types are
@@ -104,6 +105,15 @@ typedef struct ctf_link_sym
 /* Omit the content of the variables section.  */
 #define CTF_LINK_OMIT_VARIABLES_SECTION 0x8
 
+/* If *unset*, filter out entries corresponding to linker-reported symbols
+   from the variable section, and filter out all entries with no linker-reported
+   symbols from the data object and function info sections: if set, do no
+   filtering and leave all entries in place.  (This is a negative-sense flag
+   because it is rare to want symbols the linker has not reported as present to
+   stick around in the symtypetab sections nonetheless: relocatable links are
+   the only likely case.)  */
+#define CTF_LINK_NO_FILTER_REPORTED_SYMS 0x10
+
 /* Symbolic names for CTF sections.  */
 
 typedef enum ctf_sect_names
@@ -230,7 +240,9 @@ typedef struct ctf_snapshot_id
   _CTF_ITEM (ECTF_NEXT_WRONGFUN, "Wrong iteration function called.") \
   _CTF_ITEM (ECTF_NEXT_WRONGFP, "Iteration entity changed in mid-iterate.") \
   _CTF_ITEM (ECTF_FLAGS, "CTF header contains flags unknown to libctf.") \
-  _CTF_ITEM (ECTF_NEEDSBFD, "This feature needs a libctf with BFD support.")
+  _CTF_ITEM (ECTF_NEEDSBFD, "This feature needs a libctf with BFD support.") \
+  _CTF_ITEM (ECTF_INCOMPLETE, "Type is not a complete type.") \
+  _CTF_ITEM (ECTF_NONAME, "Type name must not be empty.")
 
 #define        ECTF_BASE       1000    /* Base value for libctf errnos.  */
 
@@ -243,7 +255,7 @@ _CTF_ERRORS
 #undef _CTF_FIRST
   };
 
-#define ECTF_NERR (ECTF_NEEDSBFD - ECTF_BASE + 1) /* Count of CTF errors.  */
+#define ECTF_NERR (ECTF_NONAME - ECTF_BASE + 1) /* Count of CTF errors.  */
 
 /* The CTF data model is inferred to be the caller's data model or the data
    model of the given object, unless ctf_setmodel is explicitly called.  */
@@ -263,6 +275,10 @@ _CTF_ERRORS
 #define        CTF_ADD_NONROOT 0       /* Type only visible in nested scope.  */
 #define        CTF_ADD_ROOT    1       /* Type visible at top-level scope.  */
 
+/* Flags for ctf_member_next.  */
+
+#define CTF_MN_RECURSE 0x1     /* Recurse into unnamed members.  */
+
 /* These typedefs are used to define the signature for callback functions that
    can be used with the iteration and visit functions below.  There is also a
    family of iteration functions that do not require callbacks.  */
@@ -323,6 +339,9 @@ extern void ctf_arc_close (ctf_archive_t *);
 extern ctf_dict_t *ctf_arc_lookup_symbol (ctf_archive_t *,
                                          unsigned long symidx,
                                          ctf_id_t *, int *errp);
+extern ctf_dict_t *ctf_arc_lookup_symbol_name (ctf_archive_t *,
+                                              const char *name,
+                                              ctf_id_t *, int *errp);
 extern void ctf_arc_flush_caches (ctf_archive_t *);
 extern ctf_dict_t *ctf_dict_open (const ctf_archive_t *,
                                  const char *, int *);
@@ -373,6 +392,7 @@ extern int ctf_func_type_args (ctf_dict_t *, ctf_id_t, uint32_t, ctf_id_t *);
 
 extern ctf_id_t ctf_lookup_by_name (ctf_dict_t *, const char *);
 extern ctf_id_t ctf_lookup_by_symbol (ctf_dict_t *, unsigned long);
+extern ctf_id_t ctf_lookup_by_symbol_name (ctf_dict_t *, const char *);
 extern ctf_id_t ctf_symbol_next (ctf_dict_t *, ctf_next_t **,
                                 const char **name, int functions);
 extern ctf_id_t ctf_lookup_variable (ctf_dict_t *, const char *);
@@ -410,7 +430,8 @@ extern int ctf_label_info (ctf_dict_t *, const char *, ctf_lblinfo_t *);
 extern int ctf_member_count (ctf_dict_t *, ctf_id_t);
 extern int ctf_member_iter (ctf_dict_t *, ctf_id_t, ctf_member_f *, void *);
 extern ssize_t ctf_member_next (ctf_dict_t *, ctf_id_t, ctf_next_t **,
-                               const char **name, ctf_id_t *membtype);
+                               const char **name, ctf_id_t *membtype,
+                               int flags);
 extern int ctf_enum_iter (ctf_dict_t *, ctf_id_t, ctf_enum_f *, void *);
 extern const char *ctf_enum_next (ctf_dict_t *, ctf_id_t, ctf_next_t **,
                                  int *);
@@ -470,6 +491,7 @@ extern ctf_id_t ctf_add_struct_sized (ctf_dict_t *, uint32_t, const char *,
                                      size_t);
 extern ctf_id_t ctf_add_union_sized (ctf_dict_t *, uint32_t, const char *,
                                     size_t);
+extern ctf_id_t ctf_add_unknown (ctf_dict_t *, uint32_t, const char *);
 extern ctf_id_t ctf_add_volatile (ctf_dict_t *, uint32_t, ctf_id_t);
 
 extern int ctf_add_enumerator (ctf_dict_t *, ctf_id_t, const char *, int);
This page took 0.023308 seconds and 4 git commands to generate.