Lines Matching refs:type

59 /* Print data of type TYPE located at VALADDR (within GDB), which came from
73 c_val_print (struct type *type, char *valaddr, int embedded_offset,
79 struct type *elttype;
84 CHECK_TYPEDEF (type);
85 switch (TYPE_CODE (type))
88 elttype = check_typedef (TYPE_TARGET_TYPE (type));
89 if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
92 len = TYPE_LENGTH (type) / eltlen;
135 val_print_array_elements (type, valaddr + embedded_offset, address, stream,
148 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
151 if (vtblprint && cp_is_vtbl_ptr_type (type))
157 = extract_typed_address (valaddr + embedded_offset, type);
161 elttype = check_typedef (TYPE_TARGET_TYPE (type));
164 cp_print_class_method (valaddr + embedded_offset, type, stream);
169 TYPE_DOMAIN_TYPE (TYPE_TARGET_TYPE (type)),
174 addr = unpack_pointer (type, valaddr + embedded_offset);
201 else if (cp_is_vtbl_member (type))
204 CORE_ADDR vt_address = unpack_pointer (type, valaddr + embedded_offset);
219 struct type *wtype;
233 wtype = TYPE_TARGET_TYPE (type);
254 error ("not implemented: member type in c_val_print");
258 elttype = check_typedef (TYPE_TARGET_TYPE (type));
269 = extract_typed_address (valaddr + embedded_offset, type);
282 (TYPE_TARGET_TYPE (type),
303 if (vtblprint && cp_is_vtbl_ptr_type (type))
309 TYPE_FIELD_BITPOS (type, VTBL_FNADDR_OFFSET) / 8);
310 struct type *field_type = TYPE_FIELD_TYPE (type, VTBL_FNADDR_OFFSET);
317 cp_print_value_fields (type, type, valaddr, embedded_offset, address, stream, format,
324 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
327 len = TYPE_NFIELDS (type);
328 val = unpack_long (type, valaddr + embedded_offset);
332 if (val == TYPE_FIELD_BITPOS (type, i))
339 fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
350 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
356 type_print (type, "", stream, -1);
365 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
368 val = unpack_long (type, valaddr + embedded_offset);
380 range type (I think it probably should copy it from the target
381 type), so we won't print values which are too large to
384 print with the target type, though, because the size of our type
385 and the target type might differ). */
392 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
396 val_print_type_code_int (type, valaddr + embedded_offset, stream);
397 /* C and C++ has no single byte int type, char is used instead.
401 if (TYPE_LENGTH (type) == 1)
404 LA_PRINT_CHAR ((unsigned char) unpack_long (type, valaddr + embedded_offset),
414 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
418 val = unpack_long (type, valaddr + embedded_offset);
419 if (TYPE_UNSIGNED (type))
431 print_scalar_formatted (valaddr + embedded_offset, type, format, 0, stream);
435 print_floating (valaddr + embedded_offset, type, stream);
441 struct value *v = value_at (type, address, NULL);
443 lookup_pointer_type (type), stream);
452 fprintf_filtered (stream, "<error type>");
458 and no complete type for struct foo in that file. */
459 fprintf_filtered (stream, "<incomplete type>");
465 TYPE_TARGET_TYPE (type),
468 print_floating (valaddr + embedded_offset, TYPE_TARGET_TYPE (type),
473 + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
474 TYPE_TARGET_TYPE (type),
478 + TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
479 TYPE_TARGET_TYPE (type),
485 error ("Invalid C/C++ type code %d in symbol table.", TYPE_CODE (type));
496 struct type *type = VALUE_TYPE (val);
497 struct type *real_type;
502 Print type also if it is a reference.
506 if (TYPE_CODE (type) == TYPE_CODE_PTR ||
507 TYPE_CODE (type) == TYPE_CODE_REF)
510 type is indicated by the quoted string anyway. */
511 if (TYPE_CODE (type) == TYPE_CODE_PTR &&
512 TYPE_NAME (type) == NULL &&
513 TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
514 strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
518 else if (objectprint && (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_CLASS))
521 if (TYPE_CODE(type) == TYPE_CODE_REF)
524 * error about a non-pointer type in value_rtti_target_type
528 VALUE_TYPE (temparg) = lookup_pointer_type(TYPE_TARGET_TYPE(type));
531 /* Pointer to class, check real type of object */
537 if (TYPE_CODE (type) == TYPE_CODE_PTR)
539 /* create a pointer type pointing to the real type */
540 type = lookup_pointer_type (real_type);
544 /* create a reference type referencing the real type */
545 type = lookup_reference_type (real_type);
553 type_print (type, "", stream, -1);
560 type_print (type, "", stream, -1);
570 /* Attempt to determine real type of object */
579 /* Print out object: enclosing type is same as real_type if full */
585 else if (type != VALUE_ENCLOSING_TYPE (val))
596 return val_print (type, VALUE_CONTENTS_ALL (val),