aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-01-07 21:16:25 +0000
committerStu Grossman <grossman@cygnus>1992-01-07 21:16:25 +0000
commit59d97f7fd7e96e74d627307834c1e69773cfa814 (patch)
tree1c5c6c59ff7026638a0a6750023f5a925098404c /gdb/buildsym.c
parentae28e3993dfa5dce443b3edbff94cfbb335bd5f1 (diff)
downloadgdb-59d97f7fd7e96e74d627307834c1e69773cfa814.zip
gdb-59d97f7fd7e96e74d627307834c1e69773cfa814.tar.gz
gdb-59d97f7fd7e96e74d627307834c1e69773cfa814.tar.bz2
buildsym.c (cleanup_undefined_types): Add support for enums.
This fixes the 'GDB internal error. cleanup_undefined_types with bad type' problem.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 0a5aa5d..37baacd 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1424,6 +1424,7 @@ cleanup_undefined_types ()
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
+ case TYPE_CODE_ENUM:
{
/* Reasonable test to see if it's been defined since. */
if (TYPE_NFIELDS (*type) == 0)
@@ -1437,6 +1438,8 @@ cleanup_undefined_types ()
typename += 7;
if (!strncmp (typename, "union ", 6))
typename += 6;
+ if (!strncmp (typename, "enum ", 5))
+ typename += 5;
for (ppt = file_symbols; ppt; ppt = ppt->next)
for (i = 0; i < ppt->nsyms; i++)
@@ -1481,7 +1484,8 @@ cleanup_undefined_types ()
default:
badtype:
- error ("GDB internal error. cleanup_undefined_types with bad type.");
+ error ("GDB internal error. cleanup_undefined_types with bad\
+ type %d.", TYPE_CODE (*type));
break;
}
}