47 error (_(
"Lower bound may not be '*' in F77"));
144 if (!cont && should_continue)
159 m_stats[dim_indx].index_type = index_type;
160 m_stats[dim_indx].nelts = nelts;
189 struct type *elt_type, LONGEST elt_off,
190 LONGEST index,
bool last_p)
196 && elt_type_prev !=
nullptr
201 elt_off_prev, elt_off));
205 if (!repeated || last_p)
215 plongest (nrepeats + 1),
223 for (LONGEST i = nrepeats; i > 0; i--)
226 index - nrepeats + repeated,
228 walk_1 (elt_type_prev, elt_off_prev, repeated && i == 1);
238 if (m_elts < m_options->print_max)
242 walk_1 (elt_type, elt_off, last_p);
259 LONGEST index,
bool last_p)
265 && elt_type_prev !=
nullptr
274 bool printed =
false;
284 plongest (nrepeats + 1),
294 for (LONGEST i = nrepeats; i > 0; i--)
337 LONGEST
offset1, LONGEST offset2)
339 if (
type->
code () == TYPE_CODE_ARRAY
344 LONGEST lowerbound, upperbound;
346 error (
"failed to get range bounds");
352 for (LONGEST i = lowerbound; i < upperbound + 1; i++)
359 offset2 + index_offset))
404 struct ui_file *stream,
int recurse,
405 const struct value *val,
409 (
type, address, (
struct value *) val, stream, recurse, options);
437 int printed_field = 0;
438 struct type *elttype;
446 case TYPE_CODE_STRING:
452 case TYPE_CODE_ARRAY:
479 if (elttype->
code () == TYPE_CODE_FUNC)
497 if (elttype->
length () == 1
498 && elttype->
code () == TYPE_CODE_INT
511 case TYPE_CODE_STRUCT:
512 case TYPE_CODE_UNION:
513 case TYPE_CODE_NAMELIST:
519 struct type *field_type
522 if (field_type->
code () != TYPE_CODE_FUNC)
527 if (
type->
code () == TYPE_CODE_NAMELIST)
534 if (sym.
symbol ==
nullptr)
535 error (_(
"failed to find symbol for name list component %s"),
542 if (printed_field > 0)
585 case TYPE_CODE_FLAGS:
588 case TYPE_CODE_ERROR:
589 case TYPE_CODE_RANGE:
591 case TYPE_CODE_COMPLEX:
626 gdb_printf (_(
"Contents of F77 COMMON block '%s':\n"),
629 gdb_printf (_(
"Contents of blank COMMON block:\n"));
631 for (index = 0; index < common->
n_entries; index++)
633 struct value *val = NULL;
644 catch (
const gdb_exception_error &except)
647 "<error reading variable: %s>",
665 int values_printed = 0;
680 gdb_printf (_(
"No symbol table info available.\n"));
697 gdb_printf (_(
"No common block '%s'.\n"), comname);
708 _(
"Print out the values contained in a Fortran COMMON block."));
void annotate_elt_rep_end(void)
void annotate_elt_rep(unsigned int repcount)
#define ALL_BLOCK_SYMBOLS(block, iter, sym)
const struct block * get_frame_block(frame_info_ptr frame, CORE_ADDR *addr_in_block)
ui_file_style style() const
void value_print_inner(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options) const override
void printstr(struct ui_file *stream, struct type *elttype, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options) const override
LONGEST index_offset(LONGEST index)
const struct value_print_options * m_options
fortran_array_printer_impl(struct type *type, CORE_ADDR address, struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
bool continue_walking(bool should_continue)
void process_element(struct type *elt_type, LONGEST elt_off, LONGEST index, bool last_p)
std::vector< struct dimension_stats > m_stats
void finish_dimension(bool inner_p, bool last_p)
struct ui_file * m_stream
struct type * m_elt_type_prev
bool dimension_contents_eq(const struct value *val, struct type *type, LONGEST offset1, LONGEST offset2)
void process_dimension(gdb::function_view< void(struct type *, int, bool)> walk_1, struct type *elt_type, LONGEST elt_off, LONGEST index, bool last_p)
void start_dimension(struct type *index_type, LONGEST nelts, bool inner_p)
struct cmd_list_element * add_info(const char *name, cmd_simple_func_ftype *fun, const char *doc)
cli_style_option variable_name_style
cli_style_option metadata_style
void _initialize_f_valprint()
LONGEST f77_get_lowerbound(struct type *type)
LONGEST f77_get_upperbound(struct type *type)
static void fortran_print_array(struct type *type, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options)
static const struct generic_val_print_decorations f_decorations
static void info_common_command_for_block(const struct block *block, const char *comname, int *any_printed)
static void f77_get_dynamic_length_of_aggregate(struct type *)
static void info_common_command(const char *comname, int from_tty)
frame_info_ptr get_selected_frame(const char *message)
const struct block * get_selected_block(CORE_ADDR *addr_in_block)
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
struct type * check_typedef(struct type *type)
const struct language_defn * current_language
int print_address_demangle(const struct value_print_options *opts, struct gdbarch *gdbarch, CORE_ADDR addr, struct ui_file *stream, int do_demangle)
static gdbpy_ref field_name(struct type *type, int field)
const struct block * block
const block * superblock() const
symbol * function() const
struct symbol * contents[1]
LONGEST const_val() const
dynamic_prop_kind kind() const
const char * name() const
struct type * type() const
const char * print_name() const
const char * linkage_name() const
address_class aclass() const
domain_enum domain() const
const common_block * value_common_block() const
struct type * target_type() const
struct field & field(int idx) const
void set_length(ULONGEST length)
range_bounds * bounds() const
type * index_type() const
const ui_file_style * ptr() const
unsigned int repeat_count_threshold
struct block_symbol lookup_symbol(const char *name, const struct block *block, domain_enum domain, struct field_of_this_result *is_a_field_of_this)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void fprintf_styled(struct ui_file *stream, const ui_file_style &style, const char *format,...)
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)
struct value * value_of_variable(struct symbol *var, const struct block *b)
void generic_value_print(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
void value_print(struct value *val, struct ui_file *stream, const struct value_print_options *options)
void value_print_scalar_formatted(struct value *val, const struct value_print_options *options, int size, struct ui_file *stream)
int val_print_string(struct type *elttype, const char *encoding, CORE_ADDR addr, int len, struct ui_file *stream, const struct value_print_options *options)
void get_user_print_options(struct value_print_options *opts)
void common_val_print(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
void print_function_pointer_address(const struct value_print_options *options, struct gdbarch *gdbarch, CORE_ADDR address, struct ui_file *stream)
void maybe_print_array_index(struct type *index_type, LONGEST index, struct ui_file *stream, const struct value_print_options *options)
struct type * value_type(const struct value *value)
struct value * value_from_component(struct value *whole, struct type *type, LONGEST offset)
struct value * value_field(struct value *arg1, int fieldno)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
CORE_ADDR value_address(const struct value *value)
LONGEST value_as_long(struct value *val)
bool value_contents_eq(const struct value *val1, LONGEST offset1, const struct value *val2, LONGEST offset2, LONGEST length)
gdb::array_view< const gdb_byte > value_contents_for_printing(struct value *value)