From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20480 invoked by alias); 28 Dec 2001 09:44:48 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 20414 invoked from network); 28 Dec 2001 09:43:41 -0000 Received: from unknown (HELO wiprom2mx1.wipro.com) (203.197.164.41) by sources.redhat.com with SMTP; 28 Dec 2001 09:43:41 -0000 Received: from m2vwall3.wipro.com (m2vwall3.wipro.com [164.164.29.237]) by wiprom2mx1.wipro.com (8.11.3/8.11.3) with SMTP id fBS9hdN12653 for ; Fri, 28 Dec 2001 15:13:39 +0530 (IST) Received: from 192.168.2.18 by m2vwall3.wipro.com (InterScan E-Mail VirusWall NT); Fri, 28 Dec 2001 15:13:33 +0530 Received: from m2vwall3.wipro.com ([164.164.29.237]) by sarovar.mail.wipro.com (Netscape Messaging Server 4.15) with SMTP id GP1SCK00.N7X for ; Fri, 28 Dec 2001 15:13:33 +0530 Received: from 192.168.223.18 by m2vwall3.wipro.com (InterScan E-Mail VirusWall NT); Fri, 28 Dec 2001 15:13:31 +0530 Received: from 8420044-mahatad.wipro.com ([192.127.177.115]) by platinum.mail.wipro.com (Netscape Messaging Server 4.15) with ESMTP id GP1SCI00.T86 for ; Fri, 28 Dec 2001 15:13:30 +0530 From: "debashis mahata" To: Subject: Double ';' problem in stabs Date: Fri, 28 Dec 2001 01:44:00 -0000 Message-ID: <001601c18f83$e123ebc0$73b17fc0@8420044-mahatad.wipro.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPartTM-000-2a01f893-fb63-11d5-a216-0000e22173f5" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-SW-Source: 2001-12/txt/msg00190.txt.bz2 This is a multi-part message in MIME format. ------=_NextPartTM-000-2a01f893-fb63-11d5-a216-0000e22173f5 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-length: 1756 Hi all, This problem was observed while using Gdb on code that is compiled with Sun C Compiler Forte 6 update 2.( cc - 5.3) While going through the Gdb code, I have noticed one issue in handling stabs for a structure / union, looks like some assumptions has been made about the format, which is not documented. The assumption made is - the structure or union stabs should end with two consecutive semicolon i.e. ';;'. One example (using Sun compiler) - For the structure struct node{ int I; char C; }; the generated stab is - "node:T(0,21)=s8I:(0,3),0,32;C:(0,1),32,8;;" where, $cc -V cc: WorkShop Compilers 5.0 98/12/15 C 5.0 You can see that the stab has two consecutive ';' at the end. But the last ';' is not documented in Sun stab document. Neither the Gdb stab document says that the last ';' should be present. The code is in file stabsread.c (function: read_struct_fields()), where Gdb searches for the last ';'. The corresponding code is - /* 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. */ while (**pp != ';') { ..... Some compilers does not generates the last ';'. For the above mentioned example and using the $cc -V cc: Sun WorkShop 6 update 2 C 5.3 2001/05/15 compiler the generated stab is - "node:T(0,21)=s8I:(0,3),0,32;C:(0,1),32,8;" In this example the last ';'is missing. Questions: 1. Is it anywhere documented that the last ';' (the second one) should be present? 2. If not, is it a bug (the assumption that last ';' should be persent) in Gdb, which requires a fix? 3. In case a fix is required what will be the long term strategy? Thanks in advance, debashis ------=_NextPartTM-000-2a01f893-fb63-11d5-a216-0000e22173f5 Content-Type: text/plain; name="InterScan_Disclaimer.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="InterScan_Disclaimer.txt" Content-length: 855 ------------------------------------------------------------------------------------------------------------------------- Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:mailadmin@wipro.com and delete this mail from your records. ---------------------------------------------------------------------------------------------------------------------- ------=_NextPartTM-000-2a01f893-fb63-11d5-a216-0000e22173f5--