From: Fred Fish Date: Mon, 30 Nov 1992 01:03:34 +0000 (+0000) Subject: * stabsread.c (define_symbol): For the sake of dbx, gcc emits X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=94daba7f7759999cb24817510d75a015f1db0824;p=binutils-gdb.git * 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8bde28b05ea..c764d583d7a 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 be97aac07b8..90f03008cf9 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));