aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-20 20:30:31 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-20 20:30:31 +0000
commit089dc22027dca5ed061c7f371a1a1e9c349ef0a1 (patch)
treea5dd518f249fbd2e318eb7a677f3482f17c4399b
parent2a4e8cc37d3a6ebae8d16a066eea26719c63f561 (diff)
downloadgdb-089dc22027dca5ed061c7f371a1a1e9c349ef0a1.zip
gdb-089dc22027dca5ed061c7f371a1a1e9c349ef0a1.tar.gz
gdb-089dc22027dca5ed061c7f371a1a1e9c349ef0a1.tar.bz2
* stabsread.c (read_struct_fields): Don't call read_cpp_abbrev on $_.
(read_cpp_abbrev): Don't complain specially for $_. Also return 0 if we don't recognize the abbrev.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/stabsread.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a02196e..08f3e34 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jun 20 13:11:11 1993 Jim Kingdon (kingdon@cygnus.com)
+
+ * stabsread.c (read_struct_fields): Don't call read_cpp_abbrev on $_.
+ (read_cpp_abbrev): Don't complain specially for $_. Also return 0 if
+ we don't recognize the abbrev.
+
Sun Jun 20 00:24:41 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* solib.c (solib_add_common_symbols): Add comment about performance.
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 84edc56..784708d 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -2134,14 +2134,13 @@ read_cpp_abbrev (fip, pp, type, objfile)
fip->list->field.bitsize = 0;
fip->list->visibility = VISIBILITY_PRIVATE;
}
- else if (*p == '_')
- {
- /* GNU C++ anonymous type. */
- complain (&stabs_general_complaint, "g++ anonymous type $_ not handled");
- }
else
{
complain (&invalid_cpp_abbrev_complaint, *pp);
+ /* We have no idea what syntax an unrecognized abbrev would have, so
+ better return 0. If we returned 1, we would need to at least advance
+ *pp to avoid an infinite loop. */
+ return 0;
}
return 1;
}
@@ -2341,7 +2340,11 @@ read_struct_fields (fip, pp, type, objfile)
/* Get the field name. */
p = *pp;
- if (*p == CPLUS_MARKER)
+ /* 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 (!read_cpp_abbrev (fip, pp, type, objfile))
return 0;