GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "gdb_string.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 "exceptions.h"
#include "objfiles.h"
Go to the source code of this file.
Functions | |
static void | print_record (struct type *, const gdb_byte *, int, struct ui_file *, int, const struct value *, const struct value_print_options *) |
static int | print_field_values (struct type *, const gdb_byte *, int, struct ui_file *, int, const struct value *, const struct value_print_options *, int, struct type *, int) |
static void | adjust_type_signedness (struct type *) |
static void | ada_val_print_1 (struct type *, const gdb_byte *, int, CORE_ADDR, struct ui_file *, int, const struct value *, const struct value_print_options *) |
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, const 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 | ui_memcpy (void *dest, const char *buffer, long len) |
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) |
void | ada_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options) |
static void | ada_val_print_array (struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, 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, const struct value *val, const struct value_print_options *options, int comma_needed, struct type *outer_type, int outer_offset) |
void | ada_value_print (struct value *val0, struct ui_file *stream, const struct value_print_options *options) |
Definition at line 271 of file ada-valprint.c.
References fprintf_filtered().
Referenced by ada_printchar(), emit_char(), and printstr().
static void ada_print_floating | ( | const gdb_byte * | valaddr, |
struct type * | type, | ||
struct ui_file * | stream | ||
) | [static] |
Definition at line 318 of file ada-valprint.c.
References do_cleanups(), fprintf_filtered(), make_cleanup_ui_file_delete(), mem_fileopen(), print_floating(), strchr(), strstr(), ui_file_put(), and ui_memcpy().
Referenced by ada_val_print_1().
void ada_print_scalar | ( | struct type * | type, |
LONGEST | val, | ||
struct ui_file * | stream | ||
) |
Definition at line 382 of file ada-valprint.c.
References _, ada_check_typedef(), ada_enum_name(), ada_print_scalar(), error(), fprintf_filtered(), fputs_filtered(), gdb_flush(), LA_PRINT_CHAR, len, 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_print_scalar(), ada_varobj_scalar_image(), print_choices(), print_dynamic_range_bound(), print_optional_low_bound(), print_range(), and print_range_bound().
void ada_printchar | ( | int | c, |
struct type * | type, | ||
struct ui_file * | stream | ||
) |
Definition at line 370 of file ada-valprint.c.
References ada_emit_char(), fputs_filtered(), and TYPE_LENGTH.
Referenced by ada_val_print_1().
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 544 of file ada-valprint.c.
References printstr(), and TYPE_LENGTH.
void ada_val_print | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options | ||
) |
Definition at line 558 of file ada-valprint.c.
References ada_val_print_1(), RETURN_MASK_ALL, and TRY_CATCH.
Referenced by print_field_values().
static void ada_val_print_1 | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | original_value, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 642 of file ada-valprint.c.
References ada_aligned_value_addr(), ada_check_typedef(), ada_coerce_to_simple_array(), ada_coerce_to_simple_array_ptr(), ada_enum_name(), ada_fixed_to_float(), ada_is_array_descriptor_type(), ada_is_bogus_array_descriptor(), ada_is_character_type(), ada_is_constrained_packed_array_type(), ada_is_fixed_point_type(), ada_is_system_address_type(), ada_is_tag_type(), ada_is_tagged_type(), ada_print_floating(), ada_printchar(), ada_tag_name(), ada_tag_value_at_base_address(), ada_val_print_array(), ada_value_ind(), builtin_type::builtin_data_ptr, builtin_type(), c_val_print(), check_typedef(), coerce_ref(), coerce_ref_if_computed(), common_val_print(), current_language, extract_typed_address(), value_print_options::format, fprintf_filtered(), fputs_filtered(), gdb_assert, gdb_flush(), get_type_arch(), len, LONGEST, lookup_pointer_type(), name, value_print_options::output_format, paddress(), print_longest(), print_record(), printable_val_type(), QUIT, 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_TYPEDEF, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_LENGTH, TYPE_NFIELDS, type_print(), TYPE_TARGET_TYPE, unpack_long(), unpack_pointer(), val_print(), val_print_scalar_formatted(), val_print_type_code_int(), value_address(), value_cast(), value_contents_for_printing(), value_embedded_offset(), value_free_to_mark(), value_from_contents_and_address(), value_from_pointer(), value_mark(), and value_type().
Referenced by ada_val_print().
static void ada_val_print_array | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 579 of file ada-valprint.c.
References ada_is_string_type(), char_at(), value_print_options::format, fprintf_filtered(), gdb_assert, gdbarch_byte_order(), get_type_arch(), len, value_print_options::prettyformat_arrays, value_print_options::print_max, print_optional_low_bound(), print_spaces_filtered(), printstr(), value_print_options::stop_print_at_null, TYPE_FIELD_BITSIZE, TYPE_LENGTH, TYPE_TARGET_TYPE, val_print_array_elements(), and val_print_packed_array_elements().
Referenced by ada_val_print_1().
void ada_value_print | ( | struct value * | val0, |
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) |
Definition at line 942 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_contents_for_printing(), value_embedded_offset(), and value_type().
static void adjust_type_signedness | ( | struct type * | type | ) | [static] |
Definition at line 60 of file ada-valprint.c.
References TYPE_CODE, TYPE_CODE_RANGE, TYPE_LOW_BOUND, and TYPE_UNSIGNED.
Referenced by print_field_values().
static int char_at | ( | const gdb_byte * | string, |
int | i, | ||
int | type_len, | ||
enum bfd_endian | byte_order | ||
) | [static] |
Definition at line 295 of file ada-valprint.c.
References extract_unsigned_integer().
Referenced by ada_val_print_array(), and printstr().
static int print_field_values | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | offset, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options, | ||
int | comma_needed, | ||
struct type * | outer_type, | ||
int | outer_offset | ||
) | [static] |
Definition at line 1029 of file ada-valprint.c.
References _, ada_is_ignored_field(), ada_is_variant_part(), ada_is_wrapper_field(), ada_name_prefix_len(), ada_val_print(), ada_value_primitive_packed_val(), adjust_type_signedness(), annotate_field_begin(), annotate_field_end(), annotate_field_name_end(), annotate_field_value(), current_language, value_print_options::deref_ref, fprintf_filtered(), fputs_filtered(), HAVE_CPLUS_STRUCT, HOST_CHAR_BIT, len, n_spaces(), 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_contents_for_printing(), value_embedded_offset(), and wrap_here().
Referenced by print_record(), and print_variant_part().
static int print_optional_low_bound | ( | struct ui_file * | stream, |
struct type * | type, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 73 of file ada-valprint.c.
References ada_print_scalar(), fprintf_filtered(), get_array_bounds(), LONGEST, 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().
static void print_record | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | offset, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 992 of file ada-valprint.c.
References ada_check_typedef(), fprintf_filtered(), value_print_options::prettyformat, print_field_values(), and print_spaces_filtered().
Referenced by ada_val_print_1().
static int print_variant_part | ( | struct type * | type, |
int | field_num, | ||
const gdb_byte * | valaddr, | ||
int | offset, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options, | ||
int | comma_needed, | ||
struct type * | outer_type, | ||
int | outer_offset | ||
) | [static] |
Definition at line 917 of file ada-valprint.c.
References ada_which_variant_applies(), HOST_CHAR_BIT, print_field_values(), TYPE_FIELD_BITPOS, and TYPE_FIELD_TYPE.
Referenced by print_field_values().
static struct type* printable_val_type | ( | struct type * | type, |
const gdb_byte * | valaddr | ||
) | [static, read] |
Definition at line 261 of file ada-valprint.c.
References ada_aligned_type(), and ada_to_fixed_type().
Referenced by ada_val_print_1().
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 464 of file ada-valprint.c.
References _, ada_emit_char(), char_at(), fprintf_filtered(), fputs_filtered(), gdbarch_byte_order(), get_type_arch(), value_print_options::print_max, QUIT, and value_print_options::repeat_count_threshold.
Referenced by ada_printstr(), and ada_val_print_array().
Definition at line 307 of file ada-valprint.c.
Referenced by ada_print_floating().
static void val_print_packed_array_elements | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | offset, | ||
int | bitoffset, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 135 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(), check_typedef(), current_language, value_print_options::deref_ref, fprintf_filtered(), get_discrete_bounds(), HOST_CHAR_BIT, len, LONGEST, maybe_print_array_index(), n_spaces(), 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_available_contents_eq(), value_contents_for_printing(), value_embedded_offset(), value_free_to_mark(), value_mark(), and wrap_here().
Referenced by ada_val_print_array().