/* Modula 2 language support routines for GDB, the GNU debugger.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2002, 2003, 2004,
- 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+ 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of GDB.
static void
m2_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string,
- unsigned int length, int force_ellipses,
+ unsigned int length, const char *encoding, int force_ellipses,
const struct value_print_options *options)
{
unsigned int i;
{
print_subexp_standard,
operator_length_standard,
+ operator_check_standard,
op_name_standard,
dump_subexp_body_standard,
evaluate_subexp_modula2
= GDBARCH_OBSTACK_ZALLOC (gdbarch, struct builtin_m2_type);
/* Modula-2 "pervasive" types. NOTE: these can be redefined!!! */
- builtin_m2_type->builtin_int =
- init_type (TYPE_CODE_INT,
- gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
- 0, "INTEGER", (struct objfile *) NULL);
- builtin_m2_type->builtin_card =
- init_type (TYPE_CODE_INT,
- gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "CARDINAL", (struct objfile *) NULL);
- builtin_m2_type->builtin_real =
- init_float_type (gdbarch_float_bit (gdbarch), "REAL", NULL);
- builtin_m2_type->builtin_char =
- init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "CHAR", (struct objfile *) NULL);
- builtin_m2_type->builtin_bool =
- init_type (TYPE_CODE_BOOL,
- gdbarch_int_bit (gdbarch) / TARGET_CHAR_BIT,
- TYPE_FLAG_UNSIGNED,
- "BOOLEAN", (struct objfile *) NULL);
+ builtin_m2_type->builtin_int
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0, "INTEGER");
+ builtin_m2_type->builtin_card
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 1, "CARDINAL");
+ builtin_m2_type->builtin_real
+ = arch_float_type (gdbarch, gdbarch_float_bit (gdbarch), "REAL", NULL);
+ builtin_m2_type->builtin_char
+ = arch_character_type (gdbarch, TARGET_CHAR_BIT, 1, "CHAR");
+ builtin_m2_type->builtin_bool
+ = arch_boolean_type (gdbarch, gdbarch_int_bit (gdbarch), 1, "BOOLEAN");
return builtin_m2_type;
}