* debug.c (debug_make_undefined_tagged_type): Make sure we are

given a kind of type we can handle.
	(debug_write_type): Handle undefined enums and structs.
	(debug_write_class_type): Handle undefined classes.
	* prdbg.c (pr_enum_type): Handle an undefined enum.
Also comment changes to debug.h.
This commit is contained in:
Ian Lance Taylor 1996-01-11 16:47:10 +00:00
parent 761f377fec
commit 36302909f2
4 changed files with 161 additions and 111 deletions

View file

@ -519,30 +519,38 @@ pr_enum_type (p, tag, names, values)
if (! append_type (info, "{ "))
return false;
val = 0;
for (i = 0; names[i] != NULL; i++)
if (names == NULL)
{
if (i > 0)
{
if (! append_type (info, ", "))
return false;
}
if (! append_type (info, names[i]))
if (! append_type (info, "/* undefined */"))
return false;
if (values[i] != val)
}
else
{
val = 0;
for (i = 0; names[i] != NULL; i++)
{
char ab[20];
if (i > 0)
{
if (! append_type (info, ", "))
return false;
}
print_vma (values[i], ab, false, false);
if (! append_type (info, " = ")
|| ! append_type (info, ab))
if (! append_type (info, names[i]))
return false;
val = values[i];
}
++val;
if (values[i] != val)
{
char ab[20];
print_vma (values[i], ab, false, false);
if (! append_type (info, " = ")
|| ! append_type (info, ab))
return false;
val = values[i];
}
++val;
}
}
return append_type (info, " }");