From: Tom Tromey <tromey@redhat.com>
To: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>, <gdb@sourceware.org>
Subject: Re: sun compiler and gdb
Date: Thu, 10 May 2012 13:34:00 -0000 [thread overview]
Message-ID: <87havoqhxm.fsf@fleche.redhat.com> (raw)
In-Reply-To: <b296894e956355c970a175e497b98a99@192.168.5.248> (Tomasz Grobelny's message of "Thu, 10 May 2012 00:57:56 +0200")
>>>>> "Tomasz" == Tomasz Grobelny <tomasz@grobelny.oswiecenia.net> writes:
Tom> If you have a small test case, a dump of the DWARF information might
Tom> prove helpful. If you only have a large test case, then something more
Tom> selective could help.
Tomasz> A trivial test case attached. Compiled with:
Tomasz> CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
I think it is a compiler bug. The DWARF (from your second posting)
looks like:
<1><13b39>: Abbrev Number: 115 (DW_TAG_imported_declaration)
<13b3a> DW_AT_import : <0x0> [Abbrev Number: 0]
I don't think this is a valid DW_AT_import.
Tomasz> But still the most important question for me is: is it supposed
Tomasz> to work? I understand that there may be bugs on either side, but
Tomasz> does the general design of dwarf format/compiler/gdb allow for
Tomasz> debugging code generated with sun studio compiler using gdb? --
Yes, it can work. The overall design is sound.
GDB even works around compiler bugs. This, however, can only happen
when an interested party patches GDB to do so.
In this case you could perhaps add some code to
dwarf2read.c:read_import_statement, and maybe a new variant of
follow_die_ref_or_sig, to handle this bogus DW_AT_import.
After that you'd have to try again and see what other bugs crop up.
One way to fully test the DWARF reader is to run with -readnow.
This will cause full expansion of all CUs -- so any problems will be
caught immediately at startup.
Tom
next prev parent reply other threads:[~2012-05-10 13:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 3:23 Tomasz Grobelny
2012-05-03 6:50 ` Sergio Durigan Junior
2012-05-03 14:00 ` Tomasz Grobelny
2012-05-09 20:31 ` Tom Tromey
2012-05-09 22:58 ` Tomasz Grobelny
2012-05-09 23:23 ` Tomasz Grobelny
2012-05-10 13:34 ` Tom Tromey [this message]
2012-05-10 16:38 ` Tomasz Grobelny
2012-05-10 17:38 ` Tomasz Grobelny
2012-05-10 20:34 ` Tom Tromey
2012-05-10 20:39 ` Tom Tromey
2012-05-10 22:08 ` Tomasz Grobelny
2012-05-11 16:21 ` Tom Tromey
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=87havoqhxm.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=sergiodj@redhat.com \
--cc=tomasz@grobelny.oswiecenia.net \
/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