• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/gdb/gdb/

Lines Matching refs:type

39 static void m2_print_bounds (struct type *type,
43 static void m2_typedef (struct type *, struct ui_file *, int, int);
44 static void m2_array (struct type *, struct ui_file *, int, int);
45 static void m2_pointer (struct type *, struct ui_file *, int, int);
46 static void m2_ref (struct type *, struct ui_file *, int, int);
47 static void m2_procedure (struct type *, struct ui_file *, int, int);
48 static void m2_union (struct type *, struct ui_file *);
49 static void m2_enum (struct type *, struct ui_file *, int, int);
50 static void m2_range (struct type *, struct ui_file *, int, int);
51 static void m2_type_name (struct type *type, struct ui_file *stream);
52 static void m2_short_set (struct type *type, struct ui_file *stream,
54 static int m2_long_set (struct type *type, struct ui_file *stream,
56 static void m2_record_fields (struct type *type, struct ui_file *stream,
58 static void m2_unknown (const char *s, struct type *type,
61 int m2_is_long_set (struct type *type);
62 int m2_is_long_set_of_type (struct type *type, struct type **of_type);
66 m2_print_type (struct type *type, char *varstring, struct ui_file *stream,
72 CHECK_TYPEDEF (type);
77 if (type == NULL)
79 fputs_filtered (_("<type unknown>"), stream);
83 code = TYPE_CODE (type);
84 switch (TYPE_CODE (type))
87 m2_short_set(type, stream, show, level);
91 if (m2_long_set (type, stream, show, level))
93 m2_record_fields (type, stream, show, level);
97 m2_typedef (type, stream, show, level);
101 m2_array (type, stream, show, level);
105 m2_pointer (type, stream, show, level);
109 m2_ref (type, stream, show, level);
113 m2_unknown (_("method"), type, stream, show, level);
117 m2_procedure (type, stream, show, level);
121 m2_union (type, stream);
125 m2_enum (type, stream, show, level);
133 m2_unknown (_("undef"), type, stream, show, level);
137 m2_unknown (_("error"), type, stream, show, level);
141 m2_range (type, stream, show, level);
148 m2_type_name (type, stream);
154 * m2_type_name - if a, type, has a name then print it.
158 m2_type_name (struct type *type, struct ui_file *stream)
160 if (TYPE_NAME (type) != NULL)
161 fputs_filtered (TYPE_NAME (type), stream);
165 * m2_range - displays a Modula-2 subrange type.
169 m2_range (struct type *type, struct ui_file *stream, int show,
172 if (TYPE_HIGH_BOUND (type) == TYPE_LOW_BOUND (type))
173 m2_print_type (TYPE_DOMAIN_TYPE (type), "", stream, show, level);
176 struct type *target = TYPE_TARGET_TYPE (type);
179 print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
181 print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
187 m2_typedef (struct type *type, struct ui_file *stream, int show,
190 if (TYPE_NAME (type) != NULL)
192 fputs_filtered (TYPE_NAME (type), stream);
195 m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
199 * m2_array - prints out a Modula-2 ARRAY ... OF type
202 static void m2_array (struct type *type, struct ui_file *stream,
206 if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
207 && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
209 if (TYPE_INDEX_TYPE (type) != 0)
211 m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 0);
213 m2_print_bounds (TYPE_INDEX_TYPE (type), stream, show, -1, 1);
217 (TYPE_LENGTH (type)
218 / TYPE_LENGTH (TYPE_TARGET_TYPE (type))));
221 m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
225 m2_pointer (struct type *type, struct ui_file *stream, int show,
228 if (TYPE_CONST (type))
233 m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
237 m2_ref (struct type *type, struct ui_file *stream, int show,
241 m2_print_type (TYPE_TARGET_TYPE (type), "", stream, show, level);
245 m2_unknown (const char *s, struct type *type, struct ui_file *stream,
251 static void m2_union (struct type *type, struct ui_file *stream)
257 m2_procedure (struct type *type, struct ui_file *stream,
261 m2_type_name (type, stream);
262 if (TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_VOID)
264 int i, len = TYPE_NFIELDS (type);
274 m2_print_type (TYPE_FIELD_TYPE (type, i), "", stream, -1, 0);
276 if (TYPE_TARGET_TYPE (type) != NULL)
279 m2_print_type (TYPE_TARGET_TYPE (type), "", stream, 0, 0);
285 m2_print_bounds (struct type *type,
289 struct type *target = TYPE_TARGET_TYPE (type);
294 if (TYPE_NFIELDS(type) == 0)
298 print_type_scalar (target, TYPE_HIGH_BOUND (type), stream);
300 print_type_scalar (target, TYPE_LOW_BOUND (type), stream);
304 m2_short_set (struct type *type, struct ui_file *stream, int show, int level)
307 m2_print_bounds (TYPE_INDEX_TYPE (type), stream,
311 m2_print_bounds (TYPE_INDEX_TYPE (type), stream,
317 m2_is_long_set (struct type *type)
322 struct type *range;
324 if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
330 len = TYPE_NFIELDS (type);
331 for (i = TYPE_N_BASECLASSES (type); i < len; i++)
333 if (TYPE_FIELD_TYPE (type, i) == NULL)
335 if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) != TYPE_CODE_SET)
337 if (TYPE_FIELD_NAME (type, i) != NULL
338 && (strcmp (TYPE_FIELD_NAME (type, i), "") != 0))
340 range = TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i));
341 if ((i > TYPE_N_BASECLASSES (type))
359 m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
361 CHECK_TYPEDEF (type);
362 switch (TYPE_CODE (type))
365 if (TYPE_LENGTH (type) < sizeof (LONGEST))
367 if (!TYPE_UNSIGNED (type))
369 *lowp = -(1 << (TYPE_LENGTH (type) * TARGET_CHAR_BIT - 1));
376 return get_discrete_bounds (type, lowp, highp);
387 m2_is_long_set_of_type (struct type *type, struct type **of_type)
390 struct type *range;
391 struct type *target;
395 if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
397 len = TYPE_NFIELDS (type);
398 i = TYPE_N_BASECLASSES (type);
401 range = TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i));
406 l1 = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i)));
407 h1 = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, len-1)));
419 m2_long_set (struct type *type, struct ui_file *stream, int show, int level)
421 struct type *index_type;
422 struct type *range_type;
423 struct type *of_type;
425 int len = TYPE_NFIELDS (type);
429 if (m2_is_long_set (type))
431 if (TYPE_TAG_NAME (type) != NULL)
433 fputs_filtered (TYPE_TAG_NAME (type), stream);
437 else if (TYPE_NAME (type) != NULL)
439 fputs_filtered (TYPE_NAME (type), stream);
444 if (TYPE_TAG_NAME (type) != NULL || TYPE_NAME (type) != NULL)
447 if (get_long_set_bounds (type, &low, &high))
450 i = TYPE_N_BASECLASSES (type);
451 if (m2_is_long_set_of_type (type, &of_type))
456 m2_print_bounds (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i)),
461 m2_print_bounds (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, len-1)),
476 m2_record_fields (struct type *type, struct ui_file *stream, int show,
481 if (TYPE_TAG_NAME (type) != NULL)
483 if (strncmp (TYPE_TAG_NAME (type), "$$", 2) != 0)
485 fputs_filtered (TYPE_TAG_NAME (type), stream);
493 if (TYPE_CODE (type) == DECLARED_TYPE_STRUCT)
495 else if (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION)
501 int len = TYPE_NFIELDS (type);
503 if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
505 else if (TYPE_CODE (type) == TYPE_CODE_UNION)
509 for (i = TYPE_N_BASECLASSES (type); i < len; i++)
514 fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
516 m2_print_type (TYPE_FIELD_TYPE (type, i),
519 if (TYPE_FIELD_PACKED (type, i))
527 TYPE_FIELD_BITSIZE (type, i));
537 m2_enum (struct type *type, struct ui_file *stream, int show, int level)
544 if (TYPE_TAG_NAME (type) == NULL)
547 else if (show > 0 || TYPE_TAG_NAME (type) == NULL)
550 len = TYPE_NFIELDS (type);
558 fputs_filtered (TYPE_FIELD_NAME (type, i), stream);
559 if (lastval != TYPE_FIELD_BITPOS (type, i))
561 fprintf_filtered (stream, " = %d", TYPE_FIELD_BITPOS (type, i));
562 lastval = TYPE_FIELD_BITPOS (type, i);