diff options
author | Fred Fish <fnf@specifix.com> | 1992-11-30 01:03:34 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1992-11-30 01:03:34 +0000 |
commit | 94daba7f7759999cb24817510d75a015f1db0824 (patch) | |
tree | d99960d6ccb6146e25c8168643051bfb25d0e281 | |
parent | b076b3f8693d7bd595cd2efd7335116c0a4ea61d (diff) | |
download | gdb-94daba7f7759999cb24817510d75a015f1db0824.zip gdb-94daba7f7759999cb24817510d75a015f1db0824.tar.gz gdb-94daba7f7759999cb24817510d75a015f1db0824.tar.bz2 |
* stabsread.c (define_symbol): For the sake of dbx, gcc emits
a single blank as the name of nameless enumerations. Recognize
this special case and set nameless flag.
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/stabsread.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8bde28b..c764d58 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -16,6 +16,9 @@ Sun Nov 29 15:22:42 1992 Fred Fish (fnf@cygnus.com) * stabsread.c (read_type): Retain function local copy of type descriptor. Rearrange code calling read_struct_type() to match new conventions. + * stabsread.c (define_symbol): For the sake of dbx, gcc emits + a single blank as the name of nameless enumerations. Recognize + this special case and set nameless flag. **** start-sanitize-chill **** * ch-exp.y (GENERAL_PROCEDURE_NAME, LOCATION_NAME): New terminal tokens. diff --git a/gdb/stabsread.c b/gdb/stabsread.c index be97aac..90f0300 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -428,7 +428,7 @@ define_symbol (valu, string, desc, type, objfile) /* We would like to eliminate nameless symbols, but keep their types. E.g. stab entry ":t10=*2" should produce a type 10, which is a pointer - to type 2, but, should not creat a symbol to address that type. Since + to type 2, but, should not create a symbol to address that type. Since the symbol will be nameless, there is no way any user can refer to it. */ int nameless; @@ -442,8 +442,8 @@ define_symbol (valu, string, desc, type, objfile) return 0; /* If a nameless stab entry, all we need is the type, not the symbol. - e.g. ":t10=*2" */ - nameless = (p == string); + e.g. ":t10=*2" or a nameless enum like " :T16=ered:0,green:1,blue:2,;" */ + nameless = (p == string || ((string[0] == ' ') && (string[1] == ':'))); sym = (struct symbol *) obstack_alloc (&objfile -> symbol_obstack, sizeof (struct symbol)); |