Lines Matching refs:type

96 /* A type.  */
100 /* Kind of type. */
102 /* Size of type (0 if not known). */
104 /* Type which is a pointer to this type. */
106 /* Tagged union with additional information about the type. */
144 /* Information kept for an indirect type. */
148 /* Slot where the final type will appear. */
171 /* The type of the class providing the virtual function table for
172 this class. This may point to the type itself. */
191 /* Return type. */
203 /* Range base type. */
204 debug_type type;
215 /* Element type. */
217 /* Range type. */
231 /* Base type. */
232 debug_type type;
237 /* Information kept for an offset type (a based pointer). */
241 /* The type the pointer is an offset from. */
243 /* The type the pointer points to. */
247 /* Information kept for a method type. */
251 /* The return type. */
253 /* The object type which this method is for. */
261 /* Information kept for a named type. */
267 /* Real type. */
268 debug_type type;
278 struct debug_type *type;
306 struct debug_type *type;
332 /* The type of the function. */
333 struct debug_type *type;
357 debug_type type;
367 /* Return type. */
385 debug_type type;
397 debug_type type;
453 /* A type. */
455 /* A tagged type (really a different sort of namespace). */
502 struct debug_type *type;
525 /* The type with the ID. */
526 struct debug_type *type;
536 /* Next type on list. */
548 /* Next type on list. */
550 /* The type we are checking. */
759 block. The debug_type argument is the type of the return value.
823 debug_record_parameter (void *handle, const char *name, debug_type type,
829 if (name == NULL || type == NULL)
843 p->type = type;
1080 debug_record_typed_const (void *handle, const char *name, debug_type type,
1087 if (name == NULL || type == NULL)
1098 tc->type = type;
1111 debug_type type ATTRIBUTE_UNUSED,
1122 debug_record_variable (void *handle, const char *name, debug_type type,
1131 if (name == NULL || type == NULL)
1166 v->type = type;
1174 /* Make a type with a given kind and size. */
1191 /* Make an indirect type which may be used as a placeholder for a type
1216 /* Make a void type. There is only one of these. */
1226 /* Make an integer type of a given size. The boolean argument is true
1244 /* Make a floating point type of a given size. FIXME: On some
1256 /* Make a boolean type of a given size. */
1266 /* Make a complex type of a given size. */
1276 /* Make a structure type. The second argument is true for a struct,
1304 /* Make an object type. The first three arguments after the handle
1307 methods, the type of the object holding the virtual function table
1343 /* Make an enumeration type. The arguments are a null terminated
1369 /* Make a pointer to a given type. */
1372 debug_make_pointer_type (void *handle, debug_type type)
1377 if (type == NULL)
1380 if (type->pointer != DEBUG_TYPE_NULL)
1381 return type->pointer;
1387 t->u.kpointer = type;
1389 type->pointer = t;
1394 /* Make a function returning a given type. FIXME: We should be able
1398 debug_make_function_type (void *handle, debug_type type,
1405 if (type == NULL)
1415 f->return_type = type;
1424 /* Make a reference to a given type. */
1427 debug_make_reference_type (void *handle, debug_type type)
1432 if (type == NULL)
1439 t->u.kreference = type;
1444 /* Make a range of a given type from a lower to an upper bound. */
1447 debug_make_range_type (void *handle, debug_type type, bfd_signed_vma lower,
1454 if (type == NULL)
1464 r->type = type;
1473 /* Make an array type. The second argument is the type of an element
1474 of the array. The third argument is the type of a range of the
1509 /* Make a set of a given type. For example, a Pascal set type. The
1514 debug_make_set_type (void *handle, debug_type type, bfd_boolean bitstringp)
1520 if (type == NULL)
1530 s->type = type;
1538 /* Make a type for a pointer which is relative to an object. The
1539 second argument is the type of the object to which the pointer is
1540 relative. The third argument is the type that the pointer points
1569 /* Make a type for a method function. The second argument is the
1570 return type, the third argument is the domain, and the fourth
1602 /* Make a const qualified version of a given type. */
1605 debug_make_const_type (void *handle, debug_type type)
1610 if (type == NULL)
1617 t->u.kconst = type;
1622 /* Make a volatile qualified version of a given type. */
1625 debug_make_volatile_type (void *handle, debug_type type)
1630 if (type == NULL)
1637 t->u.kvolatile = type;
1642 /* Make an undefined tagged type. For example, a struct which has
1677 class type. The third argument is the bit position of this base
1683 debug_make_baseclass (void *handle ATTRIBUTE_UNUSED, debug_type type,
1692 b->type = type;
1701 third argument is the type of the field. The fourth argument is
1708 debug_type type, bfd_vma bitpos, bfd_vma bitsize,
1717 f->type = type;
1727 name. The third argument is the type of the member. The fourth
1734 debug_type type, const char *physname,
1743 f->type = type;
1770 the function. The third argument is the type of the function. The
1780 const char *physname, debug_type type,
1791 m->type = type;
1807 const char *physname, debug_type type,
1817 m->type = type;
1826 /* Name a type. */
1829 debug_name_type (void *handle, const char *name, debug_type type)
1836 if (name == NULL || type == NULL)
1853 n->type = type;
1865 nm->u.type = t;
1872 /* Tag a type. */
1875 debug_tag_type (void *handle, const char *name, debug_type type)
1882 if (name == NULL || type == NULL)
1891 if (type->kind == DEBUG_KIND_TAGGED)
1893 if (strcmp (type->u.knamed->name->name, name) == 0)
1894 return type;
1906 n->type = type;
1925 /* Record the size of a given type. */
1928 debug_record_type_size (void *handle ATTRIBUTE_UNUSED, debug_type type,
1931 if (type->size != 0 && type->size != size)
1932 fprintf (stderr, _("Warning: changing type size from %d to %d\n"),
1933 type->size, size);
1935 type->size = size;
1940 /* Find a named type. */
1969 return n->u.type;
1985 return n->u.type;
1993 /* Find a tagged type. */
2031 /* Get a base type. We build a linked list on the stack to avoid
2032 crashing if the type is defined circularly. */
2035 debug_get_real_type (void *handle, debug_type type,
2041 switch (type->kind)
2044 return type;
2054 if (l->t == type || l == l->next)
2058 debug_get_type_name (handle, type));
2064 rl.t = type;
2066 switch (type->kind)
2071 if (*type->u.kindirect->slot != NULL)
2072 return debug_get_real_type (handle, *type->u.kindirect->slot, &rl);
2073 return type;
2076 return debug_get_real_type (handle, type->u.knamed->type, &rl);
2081 /* Get the kind of a type. */
2084 debug_get_type_kind (void *handle, debug_type type)
2086 if (type == NULL)
2088 type = debug_get_real_type (handle, type, NULL);
2089 if (type == NULL)
2091 return type->kind;
2094 /* Get the name of a type. */
2097 debug_get_type_name (void *handle, debug_type type)
2099 if (type->kind == DEBUG_KIND_INDIRECT)
2101 if (*type->u.kindirect->slot != NULL)
2102 return debug_get_type_name (handle, *type->u.kindirect->slot);
2103 return type->u.kindirect->tag;
2105 if (type->kind == DEBUG_KIND_NAMED
2106 || type->kind == DEBUG_KIND_TAGGED)
2107 return type->u.knamed->name->name;
2111 /* Get the size of a type. */
2114 debug_get_type_size (void *handle, debug_type type)
2116 if (type == NULL)
2120 called debug_record_type_size on a named or indirect type. */
2122 if (type->size != 0)
2123 return type->size;
2125 switch (type->kind)
2130 if (*type->u.kindirect->slot != NULL)
2131 return debug_get_type_size (handle, *type->u.kindirect->slot);
2135 return debug_get_type_size (handle, type->u.knamed->type);
2140 /* Get the return type of a function or method type. */
2143 debug_get_return_type (void *handle, debug_type type)
2145 if (type == NULL)
2148 type = debug_get_real_type (handle, type, NULL);
2149 if (type == NULL)
2152 switch (type->kind)
2157 return type->u.kfunction->return_type;
2159 return type->u.kmethod->return_type;
2164 /* Get the parameter types of a function or method type (except that
2168 debug_get_parameter_types (void *handle, debug_type type,
2171 if (type == NULL)
2174 type = debug_get_real_type (handle, type, NULL);
2175 if (type == NULL)
2178 switch (type->kind)
2183 *pvarargs = type->u.kfunction->varargs;
2184 return type->u.kfunction->arg_types;
2186 *pvarargs = type->u.kmethod->varargs;
2187 return type->u.kmethod->arg_types;
2192 /* Get the target type of a type. */
2195 debug_get_target_type (void *handle, debug_type type)
2197 if (type == NULL)
2200 type = debug_get_real_type (handle, type, NULL);
2201 if (type == NULL)
2204 switch (type->kind)
2209 return type->u.kpointer;
2211 return type->u.kreference;
2213 return type->u.kconst;
2215 return type->u.kvolatile;
2224 debug_get_fields (void *handle, debug_type type)
2226 if (type == NULL)
2229 type = debug_get_real_type (handle, type, NULL);
2230 if (type == NULL)
2233 switch (type->kind)
2241 return type->u.kclass->fields;
2246 /* Get the type of a field. */
2253 return field->type;
2377 if (! debug_write_type (info, fns, fhandle, n->u.type, n)
2386 if (! debug_write_type (info, fns, fhandle, n->u.variable->type,
2399 if (! debug_write_type (info, fns, fhandle, n->u.typed_constant->type,
2411 /* Write out a type. If the type is DEBUG_KIND_NAMED or
2413 are about to call typedef or tag. If the type is anything else,
2414 then the name argument is a tag from a DEBUG_KIND_TAGGED type which
2420 struct debug_type *type, struct debug_name *name)
2426 /* If we have a name for this type, just output it. We only output
2427 typedef names after they have been defined. We output type tags
2429 if ((type->kind == DEBUG_KIND_NAMED
2430 || type->kind == DEBUG_KIND_TAGGED)
2431 && (type->u.knamed->name->mark == info->mark
2432 || (type->kind == DEBUG_KIND_TAGGED
2433 && type->u.knamed->name != name)))
2435 if (type->kind == DEBUG_KIND_NAMED)
2436 return (*fns->typedef_type) (fhandle, type->u.knamed->name->name);
2442 real = debug_get_real_type ((void *) info, type, NULL);
2455 type->u.knamed->name->name,
2462 return (*fns->tag_type) (fhandle, type->u.knamed->name->name, id,
2468 that we don't just define a type in terms of itself. We need to
2475 && type->kind != DEBUG_KIND_NAMED
2476 && type->kind != DEBUG_KIND_TAGGED)
2482 switch (type->kind)
2485 debug_error (_("debug_write_type: illegal type encountered"));
2488 if (*type->u.kindirect->slot == DEBUG_TYPE_NULL)
2490 return debug_write_type (info, fns, fhandle, *type->u.kindirect->slot,
2495 return (*fns->int_type) (fhandle, type->size, type->u.kint);
2497 return (*fns->float_type) (fhandle, type->size);
2499 return (*fns->complex_type) (fhandle, type->size);
2501 return (*fns->bool_type) (fhandle, type->size);
2504 if (type->u.kclass != NULL)
2506 if (type->u.kclass->id <= info->base_id)
2508 if (! debug_set_class_id (info, tag, type))
2512 if (info->mark == type->u.kclass->mark)
2517 assert (type->u.kclass->id > info->base_id);
2518 return (*fns->tag_type) (fhandle, tag, type->u.kclass->id,
2519 type->kind);
2521 type->u.kclass->mark = info->mark;
2525 (type->u.kclass != NULL
2526 ? type->u.kclass->id
2528 type->kind == DEBUG_KIND_STRUCT,
2529 type->size))
2531 if (type->u.kclass != NULL
2532 && type->u.kclass->fields != NULL)
2534 for (i = 0; type->u.kclass->fields[i] != NULL; i++)
2538 f = type->u.kclass->fields[i];
2539 if (! debug_write_type (info, fns, fhandle, f->type,
2549 return debug_write_class_type (info, fns, fhandle, type, tag);
2551 if (type->u.kenum == NULL)
2554 return (*fns->enum_type) (fhandle, tag, type->u.kenum->names,
2555 type->u.kenum->values);
2557 if (! debug_write_type (info, fns, fhandle, type->u.kpointer,
2563 type->u.kfunction->return_type,
2566 if (type->u.kfunction->arg_types == NULL)
2570 for (is = 0; type->u.kfunction->arg_types[is] != NULL; is++)
2572 type->u.kfunction->arg_types[is],
2577 type->u.kfunction->varargs);
2579 if (! debug_write_type (info, fns, fhandle, type->u.kreference,
2584 if (! debug_write_type (info, fns, fhandle, type->u.krange->type,
2587 return (*fns->range_type) (fhandle, type->u.krange->lower,
2588 type->u.krange->upper);
2590 if (! debug_write_type (info, fns, fhandle, type->u.karray->element_type,
2593 type->u.karray->range_type,
2596 return (*fns->array_type) (fhandle, type->u.karray->lower,
2597 type->u.karray->upper,
2598 type->u.karray->stringp);
2600 if (! debug_write_type (info, fns, fhandle, type->u.kset->type,
2603 return (*fns->set_type) (fhandle, type->u.kset->bitstringp);
2605 if (! debug_write_type (info, fns, fhandle, type->u.koffset->base_type,
2608 type->u.koffset->target_type,
2614 type->u.kmethod->return_type,
2617 if (type->u.kmethod->arg_types == NULL)
2621 for (is = 0; type->u.kmethod->arg_types[is] != NULL; is++)
2623 type->u.kmethod->arg_types[is],
2627 if (type->u.kmethod->domain_type != NULL)
2630 type->u.kmethod->domain_type,
2635 type->u.kmethod->domain_type != NULL,
2637 type->u.kmethod->varargs);
2639 if (! debug_write_type (info, fns, fhandle, type->u.kconst,
2644 if (! debug_write_type (info, fns, fhandle, type->u.kvolatile,
2649 return debug_write_type (info, fns, fhandle, type->u.knamed->type,
2652 return debug_write_type (info, fns, fhandle, type->u.knamed->type,
2653 type->u.knamed->name);
2660 /* Write out a class type. */
2665 struct debug_type *type, const char *tag)
2671 if (type->u.kclass == NULL)
2678 if (type->u.kclass->id <= info->base_id)
2680 if (! debug_set_class_id (info, tag, type))
2684 if (info->mark == type->u.kclass->mark)
2689 assert (type->u.kclass->id > info->base_id);
2690 return (*fns->tag_type) (fhandle, tag, type->u.kclass->id,
2691 type->kind);
2693 type->u.kclass->mark = info->mark;
2694 id = type->u.kclass->id;
2696 vptrbase = type->u.kclass->vptrbase;
2697 if (vptrbase != NULL && vptrbase != type)
2706 type->kind == DEBUG_KIND_CLASS,
2707 type->size,
2709 vptrbase == type))
2712 if (type->u.kclass != NULL)
2714 if (type->u.kclass->fields != NULL)
2716 for (i = 0; type->u.kclass->fields[i] != NULL; i++)
2720 f = type->u.kclass->fields[i];
2721 if (! debug_write_type (info, fns, fhandle, f->type,
2740 if (type->u.kclass->baseclasses != NULL)
2742 for (i = 0; type->u.kclass->baseclasses[i] != NULL; i++)
2746 b = type->u.kclass->baseclasses[i];
2747 if (! debug_write_type (info, fns, fhandle, b->type,
2756 if (type->u.kclass->methods != NULL)
2758 for (i = 0; type->u.kclass->methods[i] != NULL; i++)
2763 m = type->u.kclass->methods[i];
2777 if (! debug_write_type (info, fns, fhandle, v->type,
2833 if (! debug_write_type (info, fns, fhandle, p->type,
2935 name, we use the same ID. This type of things happens because the
2940 struct debug_type *type)
2945 assert (type->kind == DEBUG_KIND_STRUCT
2946 || type->kind == DEBUG_KIND_UNION
2947 || type->kind == DEBUG_KIND_CLASS
2948 || type->kind == DEBUG_KIND_UNION_CLASS);
2950 c = type->u.kclass;
2957 if (l->type->kind != type->kind)
2973 if (debug_type_samep (info, l->type, type))
2975 c->id = l->type->u.kclass->id;
2988 l->type = type;
3034 return debug_type_samep (info, t1->u.knamed->type, t2);
3037 return debug_type_samep (info, t1, t2->u.knamed->type);
3160 && debug_type_samep (info, t1->u.krange->type,
3161 t2->u.krange->type));
3173 && debug_type_samep (info, t1->u.kset->type, t2->u.kset->type));
3222 && debug_type_samep (info, t1->u.knamed->type,
3223 t2->u.knamed->type));
3284 f1->type, NULL),
3286 f2->type, NULL)))
3314 || ! debug_type_samep (info, b1->type, b2->type))
3356 || ! debug_type_samep (info, v1->type, v2->type))