aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-11-05 04:49:06 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-11-05 04:49:06 +0000
commitf73fb0ce032d39883e30f07bdbd3e92c20841a34 (patch)
treee69de16bf4feae93e7a58811b3a690a6edeab22c
parent5576858065de4e33b6b2f8728e82ac3c474888ae (diff)
downloadgdb-f73fb0ce032d39883e30f07bdbd3e92c20841a34.zip
gdb-f73fb0ce032d39883e30f07bdbd3e92c20841a34.tar.gz
gdb-f73fb0ce032d39883e30f07bdbd3e92c20841a34.tar.bz2
* stabsread.c (read_struct_fields): Accept either '$' or '.' as
the character which introduces a cpp_abbrev or anonymous type.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/stabsread.c15
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 029db4f..a429a56 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
Thu Nov 4 08:27:24 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
+ * stabsread.c (read_struct_fields): Accept either '$' or '.' as
+ the character which introduces a cpp_abbrev or anonymous type.
+
* c-lang.c (c_printstr): Print "" to stream (like all the other
output from this function), not gdb_stdout.
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;