aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-05-31 20:14:59 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-05-31 20:14:59 +0000
commit36bcda79581c050020f8a02c3c86b7678cc5ed7e (patch)
tree28a231c6ec42db21e7268665190c0f378cb25dbd /gdb/stabsread.c
parent05b4279b3073e98b6ba3790a133feb948042fd4f (diff)
downloadgdb-36bcda79581c050020f8a02c3c86b7678cc5ed7e.zip
gdb-36bcda79581c050020f8a02c3c86b7678cc5ed7e.tar.gz
gdb-36bcda79581c050020f8a02c3c86b7678cc5ed7e.tar.bz2
* stabsread.c (read_type): Skip type attributes if present.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c39
1 files changed, 24 insertions, 15 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 0fdacb0..84edc56 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1255,22 +1255,31 @@ read_type (pp, objfile)
return dbx_alloc_type (typenums, objfile);
/* Type is being defined here. */
-#if 0 /* Callers aren't prepared for a NULL result! FIXME -- metin! */
- {
- struct type *tt;
-
- /* if such a type already exists, this is an unnecessary duplication
- of the stab string, which is common in (RS/6000) xlc generated
- objects. In that case, simply return NULL and let the caller take
- care of it. */
-
- tt = *dbx_lookup_type (typenums);
- if (tt && tt->length && tt->code)
- return NULL;
- }
-#endif
+ /* Skip the '='. */
+ ++(*pp);
- *pp += 2;
+ while (**pp == '@')
+ {
+ char *p = *pp + 1;
+ /* It might be a type attribute or a member type. */
+ if (isdigit (*p) || *p == '(' || *p == '-')
+ /* Member type. */
+ break;
+ else
+ {
+ /* Type attributes; skip to the semicolon. */
+ while (*p != ';' && *p != '\0')
+ ++p;
+ *pp = p;
+ if (*p == '\0')
+ return error_type (pp);
+ else
+ /* Skip the semicolon. */
+ ++*pp;
+ }
+ }
+ /* Skip the type descriptor, we get it below with (*pp)[-1]. */
+ ++(*pp);
}
else
{