aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-01-04 19:43:09 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-01-04 19:43:09 +0000
commitfedbd09164ad3166d097fc55b8a6082b8fd14350 (patch)
treed38771dc2b59e7b27b59b726b6ff9860013a69a2 /gdb/stabsread.c
parenteb43544b6f41c344ad4cc1a6ec1169bab9f3899a (diff)
downloadgdb-fedbd09164ad3166d097fc55b8a6082b8fd14350.zip
gdb-fedbd09164ad3166d097fc55b8a6082b8fd14350.tar.gz
gdb-fedbd09164ad3166d097fc55b8a6082b8fd14350.tar.bz2
2002-01-04 Elena Zannoni <ezannoni@redhat.com>
* stabsread.c: Update copyright years. From Debashis Mahata <debashis.mahata@wipro.com>: (read_struct_fields): Deal with Sun C compiler erroneous stab output for structs and unions.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 620634a..0b5ceac 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1,6 +1,6 @@
/* Support routines for decoding "stabs" debugging information format.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
- 1996, 1997, 1998, 1999, 2000
+ 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GDB.
@@ -3541,8 +3541,10 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
/* Read each data member type until we find the terminating ';' at the end of
the data member list, or break for some other reason such as finding the
start of the member function list. */
+ /* Stab string for structure/union does not end with two ';' in
+ SUN C compiler 5.3 i.e. F6U2, hence check for end of string. */
- while (**pp != ';')
+ while (**pp != ';' && **pp != '\0')
{
if (os9k_stabs && **pp == ',')
break;