aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1992-11-30 01:03:34 +0000
committerFred Fish <fnf@specifix.com>1992-11-30 01:03:34 +0000
commit94daba7f7759999cb24817510d75a015f1db0824 (patch)
treed99960d6ccb6146e25c8168643051bfb25d0e281 /gdb/stabsread.c
parentb076b3f8693d7bd595cd2efd7335116c0a4ea61d (diff)
downloadgdb-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.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c6
1 files changed, 3 insertions, 3 deletions
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));