From: Elena Zannoni <ezannoni@cygnus.com>
To: "debashis mahata" <debashis.mahata@wipro.com>
Cc: <gdb@sources.redhat.com>
Subject: Re: Double ';' problem in stabs
Date: Fri, 04 Jan 2002 11:45:00 -0000 [thread overview]
Message-ID: <15413.64306.693267.391667@localhost.localdomain> (raw)
In-Reply-To: <001601c18f83$e123ebc0$73b17fc0@8420044-mahatad.wipro.com>
Debashis,
I have committed the suggested fix.
http://sources.redhat.com/ml/gdb-patches/2002-01/msg00035.html
Thanks
Elena
debashis mahata writes:
> 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
> -------------------------------------------------------------------------------------------------------------------------
> 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.
> ----------------------------------------------------------------------------------------------------------------------
prev parent reply other threads:[~2002-01-04 19:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-28 1:44 debashis mahata
2002-01-03 20:22 ` Andrew Cagney
2002-01-04 11:45 ` Elena Zannoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15413.64306.693267.391667@localhost.localdomain \
--to=ezannoni@cygnus.com \
--cc=debashis.mahata@wipro.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox