49 struct value *temp = arg1;
54 _(
"unbounded structure "
55 "missing _m2_high field"));
80 struct value *temp = arg1;
83 error (_(
"internal error: unbounded "
84 "array structure is unknown"));
87 _(
"unbounded structure "
88 "missing _m2_contents field"));
97 if (
type->
code () != TYPE_CODE_ARRAY)
100 error (_(
"cannot subscript something of type `%s'"),
103 error (_(
"cannot subscript requested type"));
127 auto add = [&] (
struct type * t)
157 const gdb_byte *
string,
unsigned int length,
158 const char *encoding,
int force_ellipses,
162 unsigned int things_printed = 0;
173 for (i = 0; i < length && things_printed < print_max_chars; ++i)
191 while (rep1 < length &&
string[rep1] ==
string[i])
205 gdb_printf (stream,
" <repeats %u times>", reps);
217 emitchar (
string[i], elttype, stream,
'"');
226 if (force_ellipses || i < length)
234 struct ui_file *stream,
int quoter)
const
240 if (ch ==
'\\' || ch == quoter)
270 gdb_printf (stream,
"\\%.3o", (
unsigned int) ch);
308 if (result ==
nullptr)
void emitchar(int ch, struct type *chtype, struct ui_file *stream, int quoter) const override
void language_arch_info(struct gdbarch *gdbarch, struct language_arch_info *lai) const override
void printchar(int ch, struct type *chtype, struct ui_file *stream) 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
void set(unsigned key, void *datum)
@ EVAL_AVOID_SIDE_EFFECTS
int gdbarch_int_bit(struct gdbarch *gdbarch)
int gdbarch_float_bit(struct gdbarch *gdbarch)
const struct floatformat ** gdbarch_float_format(struct gdbarch *gdbarch)
struct type * init_character_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * init_integer_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * init_float_type(type_allocator &alloc, int bit, const char *name, const struct floatformat **floatformats, enum bfd_endian byte_order)
struct type * init_boolean_type(type_allocator &alloc, int bit, int unsigned_p, const char *name)
struct type * check_typedef(struct type *type)
#define PRINT_LITERAL_FORM(c)
static m2_language m2_language_defn
struct value * eval_op_m2_high(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1)
struct value * eval_op_m2_subscript(struct type *expect_type, struct expression *exp, enum noside noside, struct value *arg1, struct value *arg2)
static const registry< gdbarch >::key< struct builtin_m2_type > m2_type_data
const struct builtin_m2_type * builtin_m2_type(struct gdbarch *gdbarch)
static struct builtin_m2_type * build_m2_types(struct gdbarch *gdbarch)
int m2_is_unbounded_array(struct type *type)
const struct builtin_m2_type * builtin_m2_type(struct gdbarch *gdbarch)
struct type * builtin_real
struct type * builtin_char
struct type * builtin_bool
struct type * builtin_card
struct type * builtin_int
struct type * type() const
void set_string_char_type(struct type *type)
void add_primitive_type(struct type *type)
void set_bool_type(struct type *type, const char *name=nullptr)
struct type * target_type() const
struct field & field(int idx) const
const char * name() const
unsigned int repeat_count_threshold
static struct value * zero(struct type *type, enum lval_type lv)
struct type * type() const
enum lval_type lval() const
void gdb_printf(struct ui_file *stream, const char *format,...)
void gdb_puts(const char *linebuffer, struct ui_file *stream)
struct value * value_subscript(struct value *array, LONGEST index)
struct value * value_ptradd(struct value *arg1, LONGEST arg2)
struct value * value_struct_elt(struct value **argp, gdb::optional< gdb::array_view< value * > > args, const char *name, int *static_memfuncp, const char *err)
struct value * value_cast(struct type *type, struct value *arg2)
struct value * value_ind(struct value *arg1)
static unsigned int get_print_max_chars(const struct value_print_options *options)
struct value * coerce_ref(struct value *arg)
LONGEST value_as_long(struct value *val)