GDB (xrefs)

Functions | Variables
/tmp/gdb-8.1/gdb/ada-typeprint.c File Reference
`#include "defs.h"`
`#include "gdb_obstack.h"`
`#include "bfd.h"`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "expression.h"`
`#include "value.h"`
`#include "gdbcore.h"`
`#include "target.h"`
`#include "command.h"`
`#include "gdbcmd.h"`
`#include "language.h"`
`#include "demangle.h"`
`#include "c-lang.h"`
`#include "typeprint.h"`
`#include "target-float.h"`
`#include "ada-lang.h"`
`#include <ctype.h>`

Go to the source code of this file.

## Functions
static int | print_selected_record_field_types (struct type *, struct type *, int, int, struct ui_file *, int, int, const struct type_print_options *)
static int | print_record_field_types (struct type *, struct type *, struct ui_file *, int, int, const struct type_print_options *)
static char * | decoded_type_name (struct type *type)
static int | type_is_full_subrange_of_target_type (struct type *type)
static void | print_range (struct type *type, struct ui_file *stream, int bounds_prefered_p)
static void | print_range_bound (struct type *type, const char *bounds, int *n, struct ui_file *stream)
static void | print_dynamic_range_bound (struct type *type, const char *name, int name_len, const char *suffix, struct ui_file *stream)
static void | print_range_type (struct type *raw_type, struct ui_file *stream, int bounds_prefered_p)
static void | print_enum_type (struct type *type, struct ui_file *stream)
static void | print_fixed_point_type (struct type *type, struct ui_file *stream)
static void | print_array_type (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
static int | print_choices (struct type *type, int field_num, struct ui_file *stream, struct type *val_type)
static void | print_variant_clauses (struct type *type, int field_num, struct type *outer_type, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
static void | print_variant_part (struct type *type, int field_num, struct type *outer_type, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
static void | print_record_type (struct type *type0, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
static void | print_unchecked_union_type (struct type *type, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
static void | print_func_type (struct type *type, struct ui_file *stream, const char *name, const struct type_print_options *flags)
void | ada_print_type (struct type *type0, const char *varstring, struct ui_file *stream, int show, int level, const struct type_print_options *flags)
void | ada_print_typedef (struct type *type, struct symbol *new_symbol, struct ui_file *stream)

## Variables
static char * | name_buffer
static int | name_buffer_len

## Function Documentation

## ◆ ada_print_type()

void ada_print_type | ( | struct type * | type0,
|  | const char * | varstring,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |

Definition at line 830 of file ada-typeprint.c.

References _, ada_aligned_type(), ada_check_typedef(), ada_get_base_type(), ada_is_aligner_type(), ada_is_array_descriptor_type(), ada_is_bogus_array_descriptor(), ada_is_constrained_packed_array_type(), ada_is_fixed_point_type(), ada_is_modular_type(), ada_is_range_type_name(), ada_modulus(), ada_name_prefix_len(), ada_type_name(), c_print_type(), decoded_type_name(), flags, fprintf_filtered(), int_string(), name, print_array_type(), print_enum_type(), print_fixed_point_type(), print_func_type(), print_range(), print_range_type(), print_record_type(), print_unchecked_union_type(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNION, TYPE_LENGTH, and TYPE_TARGET_TYPE.

Referenced by ada_print_symbol_signature(), ada_print_typedef(), print_array_type(), print_func_type(), print_selected_record_field_types(), print_unchecked_union_type(), and user_select_syms().

## ◆ ada_print_typedef()

void ada_print_typedef | ( | struct type * | type,
|  | struct symbol * | new_symbol,
|  | struct ui_file * | stream
| ) |  |

Definition at line 950 of file ada-typeprint.c.

References ada_check_typedef(), ada_print_type(), fprintf_filtered(), and type_print_raw_options.

## ◆ decoded_type_name()

static char* decoded_type_name | ( | struct type * | type | ) |
| static

Definition at line 56 of file ada-typeprint.c.

References ada_type_name(), name_buffer, name_buffer_len, and xrealloc().

Referenced by ada_print_type(), and print_record_type().

## ◆ print_array_type()

static void print_array_type | ( | struct type * | type,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 386 of file ada-typeprint.c.

References _, ada_array_arity(), ada_array_element_type(), ada_coerce_to_simple_array_type(), ada_find_parallel_type(), ada_fixup_array_indexes_type(), ada_is_constrained_packed_array_type(), ada_is_simple_array_type(), ada_print_type(), value::bitsize, flags, fprintf_filtered(), is_dynamic_type(), print_range(), print_range_type(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_FIELD_BITSIZE, TYPE_FIELD_TYPE, TYPE_INDEX_TYPE, TYPE_NFIELDS, TYPE_TARGET_TYPE, and wrap_here().

Referenced by ada_print_type().

## ◆ print_choices()

static int print_choices | ( | struct type * | type,
|  | int | field_num,
|  | struct ui_file * | stream,
|  | struct type * | val_type
| ) |  |
| static

Definition at line 474 of file ada-typeprint.c.

References ada_print_scalar(), ada_scan_number(), fprintf_filtered(), L, name, and TYPE_FIELD_NAME.

Referenced by print_variant_clauses().

## ◆ print_dynamic_range_bound()

static void print_dynamic_range_bound | ( | struct type * | type,
|  | const char * | name,
|  | int | name_len,
|  | const char * | suffix,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 254 of file ada-typeprint.c.

References ada_print_scalar(), B, fprintf_filtered(), get_int_var_value(), name, and string.

Referenced by print_range_type().

## ◆ print_enum_type()

static void print_enum_type | ( | struct type * | type,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 327 of file ada-typeprint.c.

References ada_enum_name(), fprintf_filtered(), fputs_filtered(), plongest(), QUIT, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_NFIELDS, and wrap_here().

Referenced by ada_print_type().

## ◆ print_fixed_point_type()

static void print_fixed_point_type | ( | struct type * | type,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 358 of file ada-typeprint.c.

References ada_delta(), ada_scaling_factor(), fprintf_filtered(), string, target_float_to_string(), value_contents(), value_equal(), and value_type().

Referenced by ada_print_type().

## ◆ print_func_type()

static void print_func_type | ( | struct type * | type,
|  | struct ui_file * | stream,
|  | const char * | name,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 775 of file ada-typeprint.c.

References ada_print_type(), flags, fprintf_filtered(), fputs_filtered(), name, TYPE_CODE, TYPE_CODE_VOID, TYPE_FIELD_TYPE, TYPE_NFIELDS, TYPE_TARGET_TYPE, and wrap_here().

Referenced by ada_print_type().

## ◆ print_range()

static void print_range | ( | struct type * | type,
|  | struct ui_file * | stream,
|  | int | bounds_prefered_p
| ) |  |
| static

Definition at line 137 of file ada-typeprint.c.

References ada_discrete_type_high_bound(), ada_discrete_type_low_bound(), ada_name_prefix_len(), ada_print_scalar(), CATCH, END_CATCH, fprintf_filtered(), RETURN_MASK_ERROR, TRY, type, TYPE_CODE, TYPE_CODE_ENUM, TYPE_CODE_RANGE, type_is_full_subrange_of_target_type(), TYPE_NAME, and TYPE_TARGET_TYPE.

Referenced by ada_print_type(), print_array_type(), and print_range_type().

## ◆ print_range_bound()

static void print_range_bound | ( | struct type * | type,
|  | const char * | bounds,
|  | int * | n,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 207 of file ada-typeprint.c.

References ada_print_scalar(), ada_scan_number(), B, fprintf_filtered(), TYPE_CODE, and TYPE_CODE_INT.

Referenced by print_range_type().

## ◆ print_range_type()

static void print_range_type | ( | struct type * | raw_type,
|  | struct ui_file * | stream,
|  | int | bounds_prefered_p
| ) |  |
| static

Definition at line 276 of file ada-typeprint.c.

References fprintf_filtered(), gdb_assert, name, print_dynamic_range_bound(), print_range(), print_range_bound(), TYPE_CODE, TYPE_CODE_RANGE, TYPE_NAME, and TYPE_TARGET_TYPE.

Referenced by ada_print_type(), and print_array_type().

## ◆ print_record_field_types()

static int print_record_field_types | ( | struct type * | type,
|  | struct type * | outer_type,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 670 of file ada-typeprint.c.

References flags, print_selected_record_field_types(), and TYPE_NFIELDS.

Referenced by print_record_type(), print_selected_record_field_types(), and print_variant_clauses().

## ◆ print_record_type()

static void print_record_type | ( | struct type * | type0,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 685 of file ada-typeprint.c.

References _, ada_find_parallel_type(), ada_is_tagged_type(), ada_parent_type(), ada_type_name(), decoded_type_name(), flags, fprintf_filtered(), print_record_field_types(), and type.

Referenced by ada_print_type().

## ◆ print_selected_record_field_types()

static int print_selected_record_field_types | ( | struct type * | type,
|  | struct type * | outer_type,
|  | int | fld0,
|  | int | fld1,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 626 of file ada-typeprint.c.

References ada_is_ignored_field(), ada_is_parent_field(), ada_is_variant_part(), ada_is_wrapper_field(), ada_print_type(), flags, fprintf_filtered(), print_record_field_types(), print_variant_part(), QUIT, TYPE_FIELD_NAME, TYPE_FIELD_TYPE, and TYPE_STUB.

Referenced by print_record_field_types(), and print_variant_clauses().

## ◆ print_unchecked_union_type()

static void print_unchecked_union_type | ( | struct type * | type,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 740 of file ada-typeprint.c.

References ada_print_type(), flags, fprintf_filtered(), TYPE_FIELD_NAME, TYPE_FIELD_TYPE, and TYPE_NFIELDS.

Referenced by ada_print_type().

## ◆ print_variant_clauses()

static void print_variant_clauses | ( | struct type * | type,
|  | int | field_num,
|  | struct type * | outer_type,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 555 of file ada-typeprint.c.

References ada_find_parallel_type(), ada_variant_discrim_type(), flags, fprintf_filtered(), print_choices(), print_record_field_types(), print_selected_record_field_types(), TYPE_CODE, TYPE_CODE_PTR, TYPE_CODE_UNION, TYPE_FIELD_TYPE, TYPE_NFIELDS, and TYPE_TARGET_TYPE.

Referenced by print_variant_part().

## ◆ print_variant_part()

static void print_variant_part | ( | struct type * | type,
|  | int | field_num,
|  | struct type * | outer_type,
|  | struct ui_file * | stream,
|  | int | show,
|  | int | level,
|  | const struct type_print_options * | flags
| ) |  |
| static

Definition at line 604 of file ada-typeprint.c.

References ada_variant_discrim_name(), flags, fprintf_filtered(), print_variant_clauses(), and TYPE_FIELD_TYPE.

Referenced by print_selected_record_field_types().

## ◆ type_is_full_subrange_of_target_type()

static int type_is_full_subrange_of_target_type | ( | struct type * | type | ) |
| static

Definition at line 108 of file ada-typeprint.c.

References ada_discrete_type_high_bound(), ada_discrete_type_low_bound(), is_dynamic_type(), TYPE_CODE, TYPE_CODE_RANGE, and TYPE_TARGET_TYPE.

Referenced by print_range().

## Variable Documentation

## ◆ name_buffer

char* name_buffer
| static

Definition at line 49 of file ada-typeprint.c.

Referenced by decoded_type_name().

## ◆ name_buffer_len

int name_buffer_len
| static

Definition at line 50 of file ada-typeprint.c.

Referenced by decoded_type_name().