Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>
To: Tom Tromey <tromey@redhat.com>
Cc: Sergio Durigan Junior <sergiodj@redhat.com>, <gdb@sourceware.org>
Subject: Re: sun compiler and gdb
Date: Thu, 10 May 2012 16:38:00 -0000	[thread overview]
Message-ID: <4eaa53078c18227995efd9409baaf5eb@192.168.5.248> (raw)
In-Reply-To: <87havoqhxm.fsf@fleche.redhat.com>

On Thu, 10 May 2012 07:33:41 -0600, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "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.
> 
Do you think that this portion can be just ignored by gdb?

> After that you'd have to try again and see what other bugs crop up.
> 
Actually the behaviour on the two machines I have tested on is different.
Not yet sure whether this is a problem with compiler architecture (x86 vs
sparc) or gdb version (7.4.1 vs. 7.0.1), but it looks like this on
sparc/gdb 7.0.1:
> gdb -readnow ./a.out.sparc
GNU gdb (GDB) 7.0.1
(...)
This GDB was configured as "sparc-sun-solaris2.10".
Reading symbols from /login/sg209371/gdbtest/a.out.sparc...expanding to
full symbols...Die: DW_TAG_<unknown> (abbrev 9, offset 0x1bb)
  parent at offset: 0x197
  has children: TRUE
  attributes:
    DW_AT_name (DW_FORM_string) string: "basic_ostream" (is canonicalized)
    DW_AT_<unknown> (DW_FORM_string) string: "nNbasic_ostream3CTACTB_"
(not canonicalized)
    DW_AT_decl_file (DW_FORM_data1) constant: 2
    DW_AT_decl_line (DW_FORM_data1) constant: 74
Dwarf Error: Cannot find type of die [in module
/login/sg209371/gdbtest/a.out.sparc]
(gdb) quit
> 

With the relevant portion of dwarfdump looking like this:
<2><  443>	DW_TAG_SUN_class_template
		DW_AT_name                  basic_ostream
		DW_AT_SUN_part_link_name    nNbasic_ostream3CTACTB_
		DW_AT_decl_file             2
/opt/solstudio12.2/prod/include/CC/Cstd/ostream
		DW_AT_decl_line             74


Shouldn't unknown tag just be ignored? To me it looks like some compiler
specific extension.
I searched for other tags that might be compiler specific and here is the
list:
DW_AT_SUN_cf_kind
DW_AT_SUN_comdat_function
DW_AT_SUN_command_line
DW_AT_SUN_compile_options
DW_AT_SUN_func_offsets
DW_AT_SUN_language
DW_AT_SUN_link_name
DW_AT_SUN_part_link_name
DW_AT_SUN_pass_with_const
DW_AT_SUN_return_with_const
DW_AT_SUN_template
DW_AT_SUN_vbase
DW_AT_SUN_vtable
DW_AT_SUN_vtable_abi

Are any of these supported or (at least) explicitly ignored by gdb?
-- 
Regards,
Tomasz Grobelny


  reply	other threads:[~2012-05-10 16:38 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
2012-05-10 16:38           ` Tomasz Grobelny [this message]
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=4eaa53078c18227995efd9409baaf5eb@192.168.5.248 \
    --to=tomasz@grobelny.oswiecenia.net \
    --cc=gdb@sourceware.org \
    --cc=sergiodj@redhat.com \
    --cc=tromey@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