GDB (xrefs)

Functions
/tmp/gdb-8.1/gdb/ada-valprint.c File Reference
`#include "defs.h"`
`#include <ctype.h>`
`#include "symtab.h"`
`#include "gdbtypes.h"`
`#include "expression.h"`
`#include "value.h"`
`#include "demangle.h"`
`#include "valprint.h"`
`#include "language.h"`
`#include "annotate.h"`
`#include "ada-lang.h"`
`#include "c-lang.h"`
`#include "infcall.h"`
`#include "objfiles.h"`
`#include "target-float.h"`

Go to the source code of this file.

## Functions
static int | print_field_values (struct type *, const gdb_byte *, int, struct ui_file *, int, struct value *, const struct value_print_options *, int, struct type *, int, const struct language_defn *)
static void | adjust_type_signedness (struct type *type)
static int | print_optional_low_bound (struct ui_file *stream, struct type *type, const struct value_print_options *options)
static void | val_print_packed_array_elements (struct type *type, const gdb_byte *valaddr, int offset, int bitoffset, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options)
static struct type * | printable_val_type (struct type *type, const gdb_byte *valaddr)
void | ada_emit_char (int c, struct type *type, struct ui_file *stream, int quoter, int type_len)
static int | char_at (const gdb_byte *string, int i, int type_len, enum bfd_endian byte_order)
static void | ada_print_floating (const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
void | ada_printchar (int c, struct type *type, struct ui_file *stream)
void | ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
static void | printstr (struct ui_file *stream, struct type *elttype, const gdb_byte *string, unsigned int length, int force_ellipses, int type_len, const struct value_print_options *options)
void | ada_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options)
static int | print_variant_part (struct type *type, int field_num, const gdb_byte *valaddr, int offset, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, int comma_needed, struct type *outer_type, int outer_offset, const struct language_defn *language)
static void | ada_val_print_string (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options)
static void | ada_val_print_gnat_array (struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_ptr (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_num (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_enum (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_flt (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_struct_union (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_array (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options)
static void | ada_val_print_ref (struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void | ada_val_print_1 (struct type *type, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
void | ada_val_print (struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options)
void | ada_value_print (struct value *val0, struct ui_file *stream, const struct value_print_options *options)

## Function Documentation

## ◆ ada_emit_char()

void ada_emit_char | ( | int | c,
|  | struct type * | type,
|  | struct ui_file * | stream,
|  | int | quoter,
|  | int | type_len
| ) |  |

Definition at line 259 of file ada-valprint.c.

References fprintf_filtered().

Referenced by ada_printchar(), emit_char(), and printstr().

## ◆ ada_print_floating()

static void ada_print_floating | ( | const gdb_byte * | valaddr,
|  | struct type * | type,
|  | struct ui_file * | stream
| ) |  |
| static

Definition at line 299 of file ada-valprint.c.

References fprintf_filtered(), print_floating(), string, and string_file::string().

Referenced by ada_val_print_flt().

## ◆ ada_print_scalar()

void ada_print_scalar | ( | struct type * | type,
|  | LONGEST | val,
|  | struct ui_file * | stream
| ) |  |

Definition at line 360 of file ada-valprint.c.

References _, ada_check_typedef(), ada_enum_name(), error(), fprintf_filtered(), fputs_filtered(), gdb_flush(), LA_PRINT_CHAR, print_longest(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD, TYPE_CODE_METHODPTR, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_SET, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_NFIELDS, TYPE_TARGET_TYPE, TYPE_UNSIGNED, and warning().

Referenced by ada_varobj_scalar_image(), print_choices(), print_dynamic_range_bound(), print_optional_low_bound(), print_range(), and print_range_bound().

## ◆ ada_printchar()

void ada_printchar | ( | int | c,
|  | struct type * | type,
|  | struct ui_file * | stream
| ) |  |

Definition at line 348 of file ada-valprint.c.

References ada_emit_char(), fputs_filtered(), and TYPE_LENGTH.

Referenced by ada_val_print_num().

## ◆ ada_printstr()

void ada_printstr | ( | struct ui_file * | stream,
|  | struct type * | type,
|  | const gdb_byte * | string,
|  | unsigned int | length,
|  | const char * | encoding,
|  | int | force_ellipses,
|  | const struct value_print_options * | options
| ) |  |

Definition at line 522 of file ada-valprint.c.

References type::length, printstr(), and TYPE_LENGTH.

## ◆ ada_val_print()

void ada_val_print | ( | struct type * | type,
|  | int | embedded_offset,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options
| ) |  |

Definition at line 1165 of file ada-valprint.c.

References _, ada_val_print_1(), value::address, CATCH, current_language, value::embedded_offset, END_CATCH, fprintf_filtered(), RETURN_MASK_ERROR, and TRY.

## ◆ ada_val_print_1()

static void ada_val_print_1 | ( | struct type * | type,
|  | int | offset,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 1081 of file ada-valprint.c.

References ada_aligned_value_addr(), ada_check_typedef(), ada_is_array_descriptor_type(), ada_is_constrained_packed_array_type(), ada_val_print_array(), ada_val_print_enum(), ada_val_print_flt(), ada_val_print_gnat_array(), ada_val_print_num(), ada_val_print_ptr(), ada_val_print_ref(), ada_val_print_struct_union(), value::address, language_c, language_def(), offset, printable_val_type(), resolve_dynamic_type(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_ENUM, TYPE_CODE_FLT, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNION, val_print(), and value_contents_for_printing().

Referenced by ada_val_print().

## ◆ ada_val_print_array()

static void ada_val_print_array | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options
| ) |  |
| static

Definition at line 983 of file ada-valprint.c.

References ada_is_string_type(), ada_val_print_string(), value_print_options::format, fprintf_filtered(), offset, print_optional_low_bound(), TYPE_FIELD_BITSIZE, val_print_array_elements(), and val_print_packed_array_elements().

Referenced by ada_val_print_1().

## ◆ ada_val_print_enum()

static void ada_val_print_enum | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 887 of file ada-valprint.c.

References ada_enum_name(), value_print_options::format, fprintf_filtered(), fputs_filtered(), name, print_longest(), QUIT, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_NFIELDS, unpack_long(), and val_print_scalar_formatted().

Referenced by ada_val_print_1().

## ◆ ada_val_print_flt()

static void ada_val_print_flt | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 931 of file ada-valprint.c.

References ada_print_floating(), value_print_options::format, language_c, language_def(), offset, and val_print().

Referenced by ada_val_print_1().

## ◆ ada_val_print_gnat_array()

static void ada_val_print_gnat_array | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 729 of file ada-valprint.c.

References ada_coerce_to_simple_array(), ada_coerce_to_simple_array_ptr(), value::address, coerce_ref(), fprintf_filtered(), gdb_assert, offset, TYPE_CODE, TYPE_CODE_TYPEDEF, val_print(), value_address(), value_embedded_offset(), value_free_to_mark(), value_from_contents_and_address(), value_mark(), and value_type().

Referenced by ada_val_print_1().

## ◆ ada_val_print_num()

static void ada_val_print_num | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 791 of file ada-valprint.c.

References ada_is_character_type(), ada_is_fixed_point_type(), ada_is_system_address_type(), ada_printchar(), ada_scaling_factor(), value::address, builtin_type::builtin_data_ptr, builtin_type(), extract_typed_address(), value_print_options::format, fprintf_filtered(), fputs_filtered(), get_type_arch(), offset, value_print_options::output_format, paddress(), string, target_float_to_string(), TYPE_CODE, TYPE_CODE_RANGE, TYPE_LENGTH, type_print(), TYPE_TARGET_TYPE, unpack_long(), val_print(), val_print_scalar_formatted(), value_binop(), value_cast(), value_contents(), value_embedded_offset(), value_from_contents(), value_from_contents_and_address(), and value_type().

Referenced by ada_val_print_1().

## ◆ ada_val_print_ptr()

static void ada_val_print_ptr | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 764 of file ada-valprint.c.

References ada_is_tag_type(), ada_tag_name(), value::address, fprintf_filtered(), language_c, language_def(), name, offset, val_print(), and value_from_contents_and_address().

Referenced by ada_val_print_1().

## ◆ ada_val_print_ref()

static void ada_val_print_ref | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 1016 of file ada-valprint.c.

References ada_ensure_varsize_limit(), ada_is_tagged_type(), ada_tag_value_at_base_address(), ada_value_ind(), check_typedef(), coerce_ref_if_computed(), common_val_print(), fputs_filtered(), lookup_pointer_type(), TYPE_CODE, TYPE_CODE_UNDEF, TYPE_TARGET_TYPE, unpack_pointer(), val_print(), value_address(), value_embedded_offset(), value_fetch_lazy(), value_from_pointer(), value_lazy(), and value_type().

Referenced by ada_val_print_1().

## ◆ ada_val_print_string()

static void ada_val_print_string | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options
| ) |  |
| static

Definition at line 681 of file ada-valprint.c.

References char_at(), gdb_assert, gdbarch_byte_order(), get_type_arch(), value_print_options::prettyformat_arrays, value_print_options::print_max, print_spaces_filtered(), printstr(), value_print_options::stop_print_at_null, TYPE_LENGTH, and TYPE_TARGET_TYPE.

Referenced by ada_val_print_array().

## ◆ ada_val_print_struct_union()

static void ada_val_print_struct_union | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | offset_aligned,
|  | CORE_ADDR | address,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | original_value,
|  | const struct value_print_options * | options,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 953 of file ada-valprint.c.

References ada_is_bogus_array_descriptor(), fprintf_filtered(), value_print_options::prettyformat, print_field_values(), and print_spaces_filtered().

Referenced by ada_val_print_1().

## ◆ ada_value_print()

void ada_value_print | ( | struct value * | val0,
|  | struct ui_file * | stream,
|  | const struct value_print_options * | options
| ) |  |

Definition at line 1186 of file ada-valprint.c.

References ada_check_typedef(), ada_is_array_descriptor_type(), ada_is_bogus_array_descriptor(), ada_to_fixed_value(), value::address, current_language, value_print_options::deref_ref, fprintf_filtered(), TYPE_CODE, TYPE_CODE_INT, TYPE_CODE_PTR, TYPE_CODE_TYPEDEF, TYPE_LENGTH, type_print(), TYPE_TARGET_TYPE, TYPE_UNSIGNED, val_print(), value_address(), value_embedded_offset(), and value_enclosing_type().

## ◆ adjust_type_signedness()

static void adjust_type_signedness | ( | struct type * | type | ) |
| static

Definition at line 47 of file ada-valprint.c.

References TYPE_CODE, TYPE_CODE_RANGE, TYPE_LOW_BOUND, and TYPE_UNSIGNED.

Referenced by print_field_values().

## ◆ char_at()

static int char_at | ( | const gdb_byte * | string,
|  | int | i,
|  | int | type_len,
|  | enum bfd_endian | byte_order
| ) |  |
| static

Definition at line 283 of file ada-valprint.c.

References extract_unsigned_integer().

Referenced by ada_val_print_string(), and printstr().

## ◆ print_field_values()

static int print_field_values | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options,
|  | int | comma_needed,
|  | struct type * | outer_type,
|  | int | outer_offset,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 573 of file ada-valprint.c.

References _, ada_is_ignored_field(), ada_is_variant_part(), ada_is_wrapper_field(), ada_name_prefix_len(), ada_value_primitive_packed_val(), adjust_type_signedness(), annotate_field_begin(), annotate_field_end(), annotate_field_name_end(), annotate_field_value(), value_print_options::deref_ref, fprintf_filtered(), fputs_filtered(), HAVE_CPLUS_STRUCT, HOST_CHAR_BIT, n_spaces(), offset, value_print_options::prettyformat, print_spaces_filtered(), print_variant_part(), TYPE_FIELD_BITPOS, TYPE_FIELD_BITSIZE, TYPE_FIELD_IGNORE, TYPE_FIELD_NAME, TYPE_FIELD_PACKED, TYPE_FIELD_TYPE, TYPE_NFIELDS, val_print(), value_embedded_offset(), and wrap_here().

Referenced by ada_val_print_struct_union(), and print_variant_part().

## ◆ print_optional_low_bound()

static int print_optional_low_bound | ( | struct ui_file * | stream,
|  | struct type * | type,
|  | const struct value_print_options * | options
| ) |  |
| static

Definition at line 60 of file ada-valprint.c.

References ada_print_scalar(), fprintf_filtered(), get_array_bounds(), value_print_options::print_array_indexes, TYPE_CODE, TYPE_CODE_BOOL, TYPE_CODE_ENUM, TYPE_CODE_RANGE, TYPE_CODE_UNDEF, TYPE_FIELD_ENUMVAL, TYPE_INDEX_TYPE, and TYPE_TARGET_TYPE.

Referenced by ada_val_print_array().

## ◆ print_variant_part()

static int print_variant_part | ( | struct type * | type,
|  | int | field_num,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options,
|  | int | comma_needed,
|  | struct type * | outer_type,
|  | int | outer_offset,
|  | const struct language_defn * | language
| ) |  |
| static

Definition at line 532 of file ada-valprint.c.

References ada_which_variant_applies(), HOST_CHAR_BIT, offset, print_field_values(), TYPE_FIELD_BITPOS, and TYPE_FIELD_TYPE.

Referenced by print_field_values().

## ◆ printable_val_type()

static struct type* printable_val_type | ( | struct type * | type,
|  | const gdb_byte * | valaddr
| ) |  |
| static

Definition at line 249 of file ada-valprint.c.

References ada_aligned_type(), and ada_to_fixed_type().

Referenced by ada_val_print_1().

## ◆ printstr()

static void printstr | ( | struct ui_file * | stream,
|  | struct type * | elttype,
|  | const gdb_byte * | string,
|  | unsigned int | length,
|  | int | force_ellipses,
|  | int | type_len,
|  | const struct value_print_options * | options
| ) |  |
| static

Definition at line 442 of file ada-valprint.c.

References _, ada_emit_char(), char_at(), fprintf_filtered(), fputs_filtered(), gdbarch_byte_order(), get_type_arch(), type::length, value_print_options::print_max, QUIT, and value_print_options::repeat_count_threshold.

Referenced by ada_printstr(), and ada_val_print_string().

## ◆ val_print_packed_array_elements()

static void val_print_packed_array_elements | ( | struct type * | type,
|  | const gdb_byte * | valaddr,
|  | int | offset,
|  | int | bitoffset,
|  | struct ui_file * | stream,
|  | int | recurse,
|  | struct value * | val,
|  | const struct value_print_options * | options
| ) |  |
| static

Definition at line 122 of file ada-valprint.c.

References _, ada_value_primitive_packed_val(), annotate_array_section_begin(), annotate_array_section_end(), annotate_elt(), annotate_elt_rep(), annotate_elt_rep_end(), value::bitsize, check_typedef(), current_language, value_print_options::deref_ref, fprintf_filtered(), get_discrete_bounds(), HOST_CHAR_BIT, maybe_print_array_index(), n_spaces(), offset, value_print_options::prettyformat_arrays, print_spaces_filtered(), value_print_options::repeat_count_threshold, TYPE_FIELD_BITSIZE, TYPE_INDEX_TYPE, TYPE_LENGTH, TYPE_TARGET_TYPE, val_print(), value_contents_eq(), value_embedded_offset(), value_free_to_mark(), value_mark(), value_type(), and wrap_here().

Referenced by ada_val_print_array().