24#include "gdbsupport/gdb_obstack.h"
50 struct ui_file *stream,
int show,
int level,
57 if ((varstring != NULL && *varstring !=
'\0')
62 && (
code == TYPE_CODE_FUNC
63 ||
code == TYPE_CODE_METHOD
64 ||
code == TYPE_CODE_ARRAY
65 || ((
code == TYPE_CODE_PTR
66 ||
code == TYPE_CODE_REF)
71 == TYPE_CODE_ARRAY))))))
75 if (varstring != NULL)
84 demangled_args = (*varstring !=
'\0'
85 && varstring[strlen (varstring) - 1] ==
')');
95 int show,
int passed_a_ptr)
const
117 case TYPE_CODE_ARRAY:
122 case TYPE_CODE_STRUCT:
123 case TYPE_CODE_UNION:
124 case TYPE_CODE_NAMELIST:
129 case TYPE_CODE_ERROR:
133 case TYPE_CODE_RANGE:
134 case TYPE_CODE_STRING:
135 case TYPE_CODE_METHOD:
137 case TYPE_CODE_COMPLEX:
138 case TYPE_CODE_TYPEDEF:
150 int show,
int passed_a_ptr,
152 int arrayprint_recurse_level,
153 bool print_rank_only)
const
168 case TYPE_CODE_ARRAY:
169 arrayprint_recurse_level++;
171 if (arrayprint_recurse_level == 1)
175 print_rank_only =
true;
177 print_rank_only =
true;
187 print_rank_only =
true;
192 0, 0, arrayprint_recurse_level,
200 if (lower_bound != 1)
201 gdb_printf (stream,
"%s:", plongest (lower_bound));
212 gdb_puts (plongest (upper_bound), stream);
218 0, 0, arrayprint_recurse_level,
221 if (arrayprint_recurse_level == 1)
225 arrayprint_recurse_level--;
231 arrayprint_recurse_level,
false);
241 arrayprint_recurse_level,
false);
247 "", stream, -1, 0, 0);
249 for (i = 0; i < nfields; i++)
263 case TYPE_CODE_STRUCT:
264 case TYPE_CODE_UNION:
265 case TYPE_CODE_NAMELIST:
270 case TYPE_CODE_ERROR:
274 case TYPE_CODE_RANGE:
275 case TYPE_CODE_STRING:
276 case TYPE_CODE_METHOD:
277 case TYPE_CODE_COMPLEX:
278 case TYPE_CODE_TYPEDEF:
302 int show,
int level)
const
318 if ((show <= 0) && (
type->
name () != NULL))
321 if (
type->
code () == TYPE_CODE_UNION)
322 prefix =
"Type, C_Union :: ";
323 else if (
type->
code () == TYPE_CODE_STRUCT
324 ||
type->
code () == TYPE_CODE_NAMELIST)
330 if (
type->
code () != TYPE_CODE_TYPEDEF)
335 case TYPE_CODE_TYPEDEF:
339 case TYPE_CODE_ARRAY:
350 gdb_printf (stream,
"%*sPTR TO -> ( ", level,
"");
355 gdb_printf (stream,
"%*sREF TO -> ( ", level,
"");
367 gdb_printf (stream,
"%*sstruct <unknown>", level,
"");
370 case TYPE_CODE_ERROR:
374 case TYPE_CODE_RANGE:
376 gdb_printf (stream,
"%*s<range type>", level,
"");
385 if (strcmp (
type->
name (),
"char") == 0)
386 gdb_printf (stream,
"%*scharacter", level,
"");
391 case TYPE_CODE_STRING:
402 gdb_printf (stream,
"character*%s", pulongest (upper_bound));
405 gdb_printf (stream,
"%*scharacter*(*)", level,
"");
408 case TYPE_CODE_STRUCT:
409 case TYPE_CODE_UNION:
410 case TYPE_CODE_NAMELIST:
411 if (
type->
code () == TYPE_CODE_UNION)
412 gdb_printf (stream,
"%*sType, C_Union ::", level,
"");
431 show - 1, level + 4);
436 stream, show - 1, 0, 0, 0,
false);
439 gdb_printf (stream,
"%*sEnd Type ", level,
"");
444 case TYPE_CODE_MODULE:
457 error (_(
"Invalid type code (%d) in symbol table."),
type->
code ());
ui_file_style style() const
void f_type_print_base(struct type *type, struct ui_file *stream, int show, int level) const
void f_type_print_varspec_suffix(struct type *type, struct ui_file *stream, int show, int passed_a_ptr, int demangled_args, int arrayprint_recurse_level, bool print_rank_only) const
void print_type(struct type *type, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags) const override
void f_type_print_derivation_info(struct type *type, struct ui_file *stream) const
void f_type_print_varspec_prefix(struct type *type, struct ui_file *stream, int show, int passed_a_ptr) const
void print_typedef(struct type *type, struct symbol *new_symbol, struct ui_file *stream) const override
const char * name() const override
virtual void wrap_here(int indent)
cli_style_option variable_name_style
cli_style_option metadata_style
const struct builtin_f_type * builtin_f_type(struct gdbarch *gdbarch)
LONGEST f77_get_lowerbound(struct type *)
LONGEST f77_get_upperbound(struct type *)
int type_not_associated(const struct type *type)
int type_not_allocated(const struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_ASSOCIATED_PROP(thistype)
#define TYPE_ALLOCATED_PROP(thistype)
#define TYPE_IS_ALLOCATABLE(t)
#define TYPE_DATA_LOCATION(thistype)
#define TYPE_BASECLASS(thistype, index)
#define TYPE_ERROR_NAME(type)
#define TYPE_N_BASECLASSES(thistype)
mach_port_t kern_return_t mach_port_t mach_msg_type_name_t msgportsPoly mach_port_t kern_return_t pid_t pid mach_port_t kern_return_t mach_port_t task mach_port_t kern_return_t int flags
#define prefix(a, b, R, do)
static struct symbol * new_symbol(struct die_info *, struct type *, struct dwarf2_cu *, struct symbol *=NULL)
struct type * builtin_void
dynamic_prop_kind kind() const
const char * name() const
struct type * type() const
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() const
range_bounds * bounds() const
const char * name() const
bool is_prototyped() const
const struct type_print_options type_print_raw_options
void type_print_unknown_return_type(struct ui_file *stream)
void gdb_printf(struct ui_file *stream, const char *format,...)
void fputs_styled(const char *linebuffer, const ui_file_style &style, struct ui_file *stream)
void gdb_puts(const char *linebuffer, struct ui_file *stream)