Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] stabsread.c: deal with SUN's compiler error
@ 2002-01-04 11:43 Elena Zannoni
  0 siblings, 0 replies; only message in thread
From: Elena Zannoni @ 2002-01-04 11:43 UTC (permalink / raw)
  To: gdb-patches


As reported in:
http://sources.redhat.com/ml/gdb/2001-12/msg00190.html
I have committed the following. Tested on RH linux 7.1. No regressions.

Elena

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.

Index: stabsread.c
===================================================================
RCS file: /cvs/uberbaum/gdb/stabsread.c,v
retrieving revision 1.19
diff -u -p -r1.19 stabsread.c
--- stabsread.c	2001/12/12 02:11:51	1.19
+++ stabsread.c	2002/01/04 19:35:50
@@ -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 *f
   /* 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-04 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-04 11:43 [PATCH] stabsread.c: deal with SUN's compiler error Elena Zannoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox