Change inferior thread list to be a thread map
[deliverable/binutils-gdb.git] / gdb / ctfread.c
index 3e3bd89d5f1be742d30a7925beef51dc1452a93e..06a4bc2f1beab676fbd912de8920a8e00bc39b2b 100644 (file)
@@ -98,17 +98,17 @@ typedef struct ctf_context
 
 /* The routines that read and process fields/members of a C struct, union,
    or enumeration, pass lists of data member fields in an instance of a
-   field_info structure. It is derived from dwarf2read.c.  */
+   ctf_field_info structure. It is derived from dwarf2read.c.  */
 
-struct nextfield
+struct ctf_nextfield
 {
   struct field field {};
 };
 
-struct field_info
+struct ctf_field_info
 {
   /* List of data member fields.  */
-  std::vector<struct nextfield> fields;
+  std::vector<struct ctf_nextfield> fields;
 
   /* Context.  */
   ctf_context_t *cur_context;
@@ -269,7 +269,7 @@ set_symbol_address (struct objfile *of, struct symbol *sym, const char *name)
 /* Create the vector of fields, and attach it to TYPE.  */
 
 static void
-attach_fields_to_type (struct field_info *fip, struct type *type)
+attach_fields_to_type (struct ctf_field_info *fip, struct type *type)
 {
   int nfields = fip->fields.size ();
 
@@ -284,7 +284,7 @@ attach_fields_to_type (struct field_info *fip, struct type *type)
   /* Copy the saved-up fields into the field vector.  */
   for (int i = 0; i < nfields; ++i)
     {
-      struct nextfield &field = fip->fields[i];
+      struct ctf_nextfield &field = fip->fields[i];
       TYPE_FIELD (type, i) = field.field;
     }
 }
@@ -314,7 +314,7 @@ ctf_init_float_type (struct objfile *objfile,
 
 /* Callback to add member NAME to a struct/union type. TID is the type
    of struct/union member, OFFSET is the offset of member in bits,
-   and ARG contains the field_info.  */
+   and ARG contains the ctf_field_info.  */
 
 static int
 ctf_add_member_cb (const char *name,
@@ -322,9 +322,9 @@ ctf_add_member_cb (const char *name,
                   unsigned long offset,
                   void *arg)
 {
-  struct field_info *fip = (struct field_info *) arg;
+  struct ctf_field_info *fip = (struct ctf_field_info *) arg;
   ctf_context_t *ccp = fip->cur_context;
-  struct nextfield new_field;
+  struct ctf_nextfield new_field;
   struct field *fp;
   struct type *t;
   uint32_t kind;
@@ -358,13 +358,13 @@ ctf_add_member_cb (const char *name,
 }
 
 /* Callback to add member NAME of EVAL to an enumeration type.
-   ARG contains the field_info.  */
+   ARG contains the ctf_field_info.  */
 
 static int
 ctf_add_enum_member_cb (const char *name, int enum_value, void *arg)
 {
-  struct field_info *fip = (struct field_info *) arg;
-  struct nextfield new_field;
+  struct ctf_field_info *fip = (struct ctf_field_info *) arg;
+  struct ctf_nextfield new_field;
   struct field *fp;
   ctf_context_t *ccp = fip->cur_context;
 
@@ -379,8 +379,8 @@ ctf_add_enum_member_cb (const char *name, int enum_value, void *arg)
       struct symbol *sym = allocate_symbol (ccp->of);
       OBJSTAT (ccp->of, n_syms++);
 
-      SYMBOL_SET_LANGUAGE (sym, language_c, &ccp->of->objfile_obstack);
-      SYMBOL_SET_NAMES (sym, name, strlen (name), 0, ccp->of);
+      sym->set_language (language_c, &ccp->of->objfile_obstack);
+      SYMBOL_SET_NAMES (sym, name, false, ccp->of);
       SYMBOL_ACLASS_INDEX (sym) = LOC_CONST;
       SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       SYMBOL_TYPE (sym) = fip->ptype;
@@ -408,8 +408,8 @@ new_symbol (ctf_context_t *ccp, struct type *type, ctf_id_t tid)
       sym = allocate_symbol (objfile);
       OBJSTAT (objfile, n_syms++);
 
-      SYMBOL_SET_LANGUAGE (sym, language_c, &objfile->objfile_obstack);
-      SYMBOL_SET_NAMES (sym, name.get (), strlen (name.get ()), 1, objfile);
+      sym->set_language (language_c, &objfile->objfile_obstack);
+      SYMBOL_SET_NAMES (sym, name.get (), true, objfile);
       SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
       SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
 
@@ -587,7 +587,7 @@ process_struct_members (ctf_context_t *ccp,
                        ctf_id_t tid,
                        struct type *type)
 {
-  struct field_info fi;
+  struct ctf_field_info fi;
 
   fi.cur_context = ccp;
   if (ctf_member_iter (ccp->fp, tid, ctf_add_member_cb, &fi) == CTF_ERR)
@@ -665,7 +665,7 @@ static void
 process_enum_type (ctf_context_t *ccp, ctf_id_t tid)
 {
   struct type *type;
-  struct field_info fi;
+  struct ctf_field_info fi;
 
   type = read_enum_type (ccp, tid);
 
@@ -1029,7 +1029,7 @@ ctf_add_var_cb (const char *name, ctf_id_t id, void *arg)
        if (type)
          {
            sym = new_symbol (ccp, type, id);
-           SYMBOL_SET_NAMES (sym, name, strlen (name), 0, ccp->of);
+           SYMBOL_SET_NAMES (sym, name, false, ccp->of);
          }
        break;
       case CTF_K_STRUCT:
@@ -1045,7 +1045,7 @@ ctf_add_var_cb (const char *name, ctf_id_t id, void *arg)
        SYMBOL_TYPE (sym) = type;
        SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
        SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
-       SYMBOL_SET_NAMES (sym, name, strlen (name), 0, ccp->of);
+       SYMBOL_SET_NAMES (sym, name, false, ccp->of);
        add_symbol_to_list (sym, ccp->builder->get_global_symbols ());
        break;
       default:
@@ -1230,7 +1230,7 @@ psymtab_to_symtab (struct partial_symtab *pst)
       if (sym == NULL)
        continue;
 
-      set_symbol_address (ccp->of, sym, SYMBOL_LINKAGE_NAME (sym));
+      set_symbol_address (ccp->of, sym, sym->linkage_name ());
     }
 
   pst->readin = 1;
@@ -1365,7 +1365,7 @@ ctf_psymtab_type_cb (ctf_id_t tid, void *arg)
        return 0;
     }
 
-    add_psymbol_to_list (name.get (), strlen (name.get ()), true,
+    add_psymbol_to_list (name.get (), true,
                         domain, aclass, section,
                         psymbol_placement::GLOBAL,
                         0, language_c, ccp->of);
@@ -1380,7 +1380,7 @@ ctf_psymtab_var_cb (const char *name, ctf_id_t id, void *arg)
 {
   ctf_context_t *ccp = (ctf_context_t *) arg;
 
-  add_psymbol_to_list (name, strlen (name), true,
+  add_psymbol_to_list (name, true,
                       VAR_DOMAIN, LOC_STATIC, -1,
                       psymbol_placement::GLOBAL,
                       0, language_c, ccp->of);
@@ -1445,7 +1445,7 @@ scan_partial_symbols (ctf_file_t *cfp, struct objfile *of)
       else
        aclass = LOC_TYPEDEF;
 
-      add_psymbol_to_list (tname.get (), strlen (tname.get ()), true,
+      add_psymbol_to_list (tname.get (), true,
                           tdomain, aclass, -1,
                           psymbol_placement::STATIC,
                           0, language_c, of);
This page took 0.029679 seconds and 4 git commands to generate.