From f73fb0ce032d39883e30f07bdbd3e92c20841a34 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Fri, 5 Nov 1993 04:49:06 +0000 Subject: * stabsread.c (read_struct_fields): Accept either '$' or '.' as the character which introduces a cpp_abbrev or anonymous type. --- gdb/stabsread.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'gdb/stabsread.c') diff --git a/gdb/stabsread.c b/gdb/stabsread.c index befb564..ddb18c9 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -2322,11 +2322,16 @@ read_struct_fields (fip, pp, type, objfile) /* Get the field name. */ p = *pp; - /* If is starts with CPLUS_MARKER it is a special abbreviation, unless - the CPLUS_MARKER is followed by an underscore, in which case it is - just the name of an anonymous type, which we should handle like any - other type name. */ - if (*p == CPLUS_MARKER && p[1] != '_') + + /* If is starts with CPLUS_MARKER it is a special abbreviation, + unless the CPLUS_MARKER is followed by an underscore, in + which case it is just the name of an anonymous type, which we + should handle like any other type name. We accept either '$' + or '.', because a field name can never contain one of these + characters except as a CPLUS_MARKER (we probably should be + doing that in most parts of GDB). */ + + if ((*p == '$' || *p == '.') && p[1] != '_') { if (!read_cpp_abbrev (fip, pp, type, objfile)) return 0; -- cgit v1.1