/* Support for printing Modula 2 types for GDB, the GNU debugger.
Copyright (C) 1986, 1988, 1989, 1991, 1992, 1995, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009
+ 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GDB.
void
-m2_print_type (struct type *type, char *varstring, struct ui_file *stream,
+m2_print_type (struct type *type, const char *varstring, struct ui_file *stream,
int show, int level)
{
enum type_code code;
- int demangled_args;
CHECK_TYPEDEF (type);
m2_range (type, stream, show, level);
break;
- case TYPE_CODE_TEMPLATE:
- break;
-
default:
m2_type_name (type, stream);
break;
{
struct type *target = TYPE_TARGET_TYPE (type);
- if (target == NULL)
- target = builtin_type_int32;
-
if (TYPE_NFIELDS(type) == 0)
return;
This should be integrated into gdbtypes.c
inside get_discrete_bounds. */
-int
+static int
m2_get_discrete_bounds (struct type *type, LONGEST *lowp, LONGEST *highp)
{
CHECK_TYPEDEF (type);
return 0;
range = TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i));
target = TYPE_TARGET_TYPE (range);
- if (target == NULL)
- target = builtin_type_int32;
l1 = TYPE_LOW_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, i)));
h1 = TYPE_HIGH_BOUND (TYPE_INDEX_TYPE (TYPE_FIELD_TYPE (type, len-1)));
static int
m2_long_set (struct type *type, struct ui_file *stream, int show, int level)
{
- struct type *index_type;
- struct type *range_type;
struct type *of_type;
int i;
int len = TYPE_NFIELDS (type);
wrap_here (" ");
if (show < 0)
{
- if (TYPE_CODE (type) == DECLARED_TYPE_STRUCT)
+ if (TYPE_CODE (type) == TYPE_CODE_STRUCT)
fprintf_filtered (stream, "RECORD ... END ");
- else if (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION)
+ else if (TYPE_CODE (type) == TYPE_CODE_UNION)
fprintf_filtered (stream, "CASE ... END ");
}
else if (show > 0)