* ch-lang.c (chill_create_fundamental_type): Track compiler
change that now emits debugging info with the type long for Chill longs. * dwarfread.c (read_tag_string_type): Rewrite to allow forward references of TAG_string_type DIEs in user defined types.
This commit is contained in:
parent
ba7f177aeb
commit
b6236d6ec4
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Feb 23 11:21:33 1993 Fred Fish (fnf@cygnus.com)
|
||||||
|
|
||||||
|
* ch-lang.c (chill_create_fundamental_type): Track compiler
|
||||||
|
change that now emits debugging info with the type long for Chill
|
||||||
|
longs.
|
||||||
|
* dwarfread.c (read_tag_string_type): Rewrite to allow forward
|
||||||
|
references of TAG_string_type DIEs in user defined types.
|
||||||
|
|
||||||
Mon Feb 22 15:21:54 1993 Ian Lance Taylor (ian@cygnus.com)
|
Mon Feb 22 15:21:54 1993 Ian Lance Taylor (ian@cygnus.com)
|
||||||
|
|
||||||
* remote-mips.c: New file; implements MIPS remote debugging
|
* remote-mips.c: New file; implements MIPS remote debugging
|
||||||
|
|
|
@ -223,10 +223,14 @@ chill_create_fundamental_type (objfile, typeid)
|
||||||
case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
|
case FT_UNSIGNED_SHORT: /* Chill ints are 2 bytes */
|
||||||
type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
|
type = init_type (TYPE_CODE_INT, 2, TYPE_FLAG_UNSIGNED, "UINT", objfile);
|
||||||
break;
|
break;
|
||||||
case FT_INTEGER: /* Chill longs are 4 bytes */
|
case FT_INTEGER: /* FIXME? */
|
||||||
|
case FT_SIGNED_INTEGER: /* FIXME? */
|
||||||
|
case FT_LONG: /* Chill longs are 4 bytes */
|
||||||
|
case FT_SIGNED_LONG: /* Chill longs are 4 bytes */
|
||||||
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_SIGNED, "LONG", objfile);
|
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_SIGNED, "LONG", objfile);
|
||||||
break;
|
break;
|
||||||
case FT_UNSIGNED_INTEGER: /* Chill longs are 4 bytes */
|
case FT_UNSIGNED_INTEGER: /* FIXME? */
|
||||||
|
case FT_UNSIGNED_LONG: /* Chill longs are 4 bytes */
|
||||||
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
|
type = init_type (TYPE_CODE_INT, 4, TYPE_FLAG_UNSIGNED, "ULONG", objfile);
|
||||||
break;
|
break;
|
||||||
case FT_FLOAT:
|
case FT_FLOAT:
|
||||||
|
|
|
@ -1553,30 +1553,39 @@ read_tag_string_type (dip)
|
||||||
unsigned long lowbound = 0;
|
unsigned long lowbound = 0;
|
||||||
unsigned long highbound;
|
unsigned long highbound;
|
||||||
|
|
||||||
if ((utype = lookup_utype (dip -> die_ref)) != NULL)
|
if (dip -> has_at_byte_size)
|
||||||
{
|
{
|
||||||
/* Ack, someone has stuck a type in the slot we want. Complain
|
/* A fixed bounds string */
|
||||||
about it. */
|
highbound = dip -> at_byte_size - 1;
|
||||||
complain (&dup_user_type_definition, DIE_ID, DIE_NAME);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (dip -> has_at_byte_size)
|
/* A varying length string. Stub for now. (FIXME) */
|
||||||
{
|
highbound = 1;
|
||||||
/* A fixed bounds string */
|
|
||||||
highbound = dip -> at_byte_size - 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* A varying length string. Stub for now. (FIXME) */
|
|
||||||
highbound = 1;
|
|
||||||
}
|
|
||||||
indextype = dwarf_fundamental_type (current_objfile, FT_INTEGER);
|
|
||||||
rangetype = create_range_type ((struct type *) NULL, indextype,
|
|
||||||
lowbound, highbound);
|
|
||||||
utype = create_string_type ((struct type *) NULL, rangetype);
|
|
||||||
alloc_utype (dip -> die_ref, utype);
|
|
||||||
}
|
}
|
||||||
|
indextype = dwarf_fundamental_type (current_objfile, FT_INTEGER);
|
||||||
|
rangetype = create_range_type ((struct type *) NULL, indextype, lowbound,
|
||||||
|
highbound);
|
||||||
|
|
||||||
|
utype = lookup_utype (dip -> die_ref);
|
||||||
|
if (utype == NULL)
|
||||||
|
{
|
||||||
|
/* No type defined, go ahead and create a blank one to use. */
|
||||||
|
utype = alloc_utype (dip -> die_ref, (struct type *) NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Already a type in our slot due to a forward reference. Make sure it
|
||||||
|
is a blank one. If not, complain and leave it alone. */
|
||||||
|
if (TYPE_CODE (utype) != TYPE_CODE_UNDEF)
|
||||||
|
{
|
||||||
|
complain (&dup_user_type_definition, DIE_ID, DIE_NAME);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create the string type using the blank type we either found or created. */
|
||||||
|
utype = create_string_type (utype, rangetype);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue