From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12395 invoked by alias); 4 Jan 2002 19:43:28 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12351 invoked from network); 4 Jan 2002 19:43:26 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 4 Jan 2002 19:43:26 -0000 Received: from rtl.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id LAA03118 for ; Fri, 4 Jan 2002 11:43:23 -0800 (PST) Received: (from ezannoni@localhost) by rtl.cygnus.com (8.11.2/8.11.0) id g04IuCF07390; Fri, 4 Jan 2002 13:56:12 -0500 X-Authentication-Warning: localhost.localdomain: ezannoni set sender to ezannoni@cygnus.com using -f From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15413.64203.432687.273601@localhost.localdomain> Date: Fri, 04 Jan 2002 11:43:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] stabsread.c: deal with SUN's compiler error X-Mailer: VM 7.00 under Emacs 20.7.1 X-SW-Source: 2002-01/txt/msg00035.txt.bz2 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 * stabsread.c: Update copyright years. From Debashis Mahata : (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;