47 error (_(
"Lower bound may not be '*' in F77"));
144 if (!cont && should_continue)
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)
264 bool repeated =
false;
267 && elt_type_prev !=
nullptr)
288 bool printed =
false;
298 plongest (nrepeats + 1),
308 for (LONGEST i = nrepeats; i > 0; i--)
351 LONGEST
offset1, LONGEST offset2)
353 if (
type->
code () == TYPE_CODE_ARRAY
358 LONGEST lowerbound, upperbound;
360 error (
"failed to get range bounds");
366 for (LONGEST i = lowerbound; i < upperbound + 1; i++)
373 offset2 + index_offset))
426 struct ui_file *stream,
int recurse,
427 const struct value *val,
431 (
type, address, (
struct value *) val, stream, recurse, options);
459 int printed_field = 0;
460 struct type *elttype;
464 const CORE_ADDR address = val->
address ();
468 case TYPE_CODE_STRING:
474 case TYPE_CODE_ARRAY:
501 if (elttype->
code () == TYPE_CODE_FUNC)
519 if (elttype->
length () == 1
520 && elttype->
code () == TYPE_CODE_INT
533 case TYPE_CODE_STRUCT:
534 case TYPE_CODE_UNION:
535 case TYPE_CODE_NAMELIST:
541 struct type *field_type
544 if (field_type->
code () != TYPE_CODE_FUNC)
549 if (
type->
code () == TYPE_CODE_NAMELIST)
556 if (sym.
symbol ==
nullptr)
557 error (_(
"failed to find symbol for name list component %s"),
564 if (printed_field > 0)
607 case TYPE_CODE_FLAGS:
610 case TYPE_CODE_ERROR:
611 case TYPE_CODE_RANGE:
613 case TYPE_CODE_COMPLEX:
632 const struct common_block *common = sym->value_common_block ();
637 if (comname && (!sym->linkage_name ()
638 || strcmp (comname, sym->linkage_name ()) != 0))
645 if (sym->print_name ())
646 gdb_printf (_(
"Contents of F77 COMMON block '%s':\n"),
649 gdb_printf (_(
"Contents of blank COMMON block:\n"));
651 for (index = 0; index < common->
n_entries; index++)
653 struct value *val = NULL;
664 catch (
const gdb_exception_error &except)
667 "<error reading variable: %s>",
685 int values_printed = 0;
700 gdb_printf (_(
"No symbol table info available.\n"));
717 gdb_printf (_(
"No common block '%s'.\n"), comname);
728 _(
"Print out the values contained in a Fortran COMMON block."));
void annotate_elt_rep_end(void)
void annotate_elt_rep(unsigned int repcount)
iterator_range< block_iterator_wrapper > block_iterator_range
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
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)
bool dimension_contents_eq(struct value *val, struct type *type, LONGEST offset1, LONGEST offset2)
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
const char * name() const
struct type * type() const
const char * print_name() const
struct type * target_type() const
struct field & field(int idx) const
unsigned int num_fields() 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
bool entirely_unavailable()
bool entirely_available()
struct type * type() const
bool contents_eq(LONGEST offset1, const struct value *val2, LONGEST offset2, LONGEST length) const
gdb::array_view< const gdb_byte > contents_for_printing()
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 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)
LONGEST value_as_long(struct value *val)