diff options
author | John Gilmore <gnu@cygnus> | 1991-11-28 00:51:48 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1991-11-28 00:51:48 +0000 |
commit | 67c29f758dfe3fdb08c77595154de1aaf5b9fafd (patch) | |
tree | 288a8487a9acbf74f658f0231c25ce96d2ec44db /gdb/mipsread.c | |
parent | 52bd2c221fc584e776fdc34cd66753a965a8cacc (diff) | |
download | gdb-67c29f758dfe3fdb08c77595154de1aaf5b9fafd.zip gdb-67c29f758dfe3fdb08c77595154de1aaf5b9fafd.tar.gz gdb-67c29f758dfe3fdb08c77595154de1aaf5b9fafd.tar.bz2 |
Make structs work on DECstation (sigh)
Diffstat (limited to 'gdb/mipsread.c')
-rw-r--r-- | gdb/mipsread.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/mipsread.c b/gdb/mipsread.c index 193278d..09c81a5 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -1056,6 +1056,7 @@ static struct type *parse_type(ax, sh, bs) TIR *t; struct type *tp = 0, *tp1; char *fmt; + int i; /* Procedures start off by one */ if (sh->st == stProc || sh->st == stStaticProc) @@ -1150,11 +1151,15 @@ static struct type *parse_type(ax, sh, bs) */ TYPE_CODE(tp1) = TYPE_CODE(tp); TYPE_NAME(tp1) = obsavestring(name, strlen(name)); - if (TYPE_CODE(tp1) == TYPE_CODE_ENUM) { - int i; + TYPE_TYPE_SPECIFIC(tp1) = TYPE_TYPE_SPECIFIC(tp); + /* Now do cleanup based on the final type. */ + switch (TYPE_CODE (tp1)) { + case TYPE_CODE_ENUM: for (i = 0; i < TYPE_NFIELDS(tp1); i++) - make_enum_constant(&TYPE_FIELD(tp1,i), tp1); + make_enum_constant(&TYPE_FIELD(tp1,i), + tp1); + break; } } if (tp1 != tp) { |