public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* debug/8188: DW_AT_containing_type incorrectly emitted
@ 2002-10-10 10:56 miwako.tokugawa
  0 siblings, 0 replies; 2+ messages in thread
From: miwako.tokugawa @ 2002-10-10 10:56 UTC (permalink / raw)
  To: gcc-gnats


>Number:         8188
>Category:       debug
>Synopsis:       DW_AT_containing_type incorrectly emitted
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 10 10:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     miwako.tokugawa@intel.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
It seems that g++ misuses DW_AT_containing_type. If you compile test.cpp (attached), we see this.
<1><d5e>: Abbrev Number: 15 (DW_TAG_structure_type)
     DW_AT_sibling     : <df0>  
     DW_AT_name        : B      
     DW_AT_byte_size   : 12     
     DW_AT_decl_file   : 1      
     DW_AT_decl_line   : 12     
     DW_AT_containing_type: <cc4>       
Dwarf3 draft (draft7) section 5.12 describes this attribute as being attached DW_TAG_ptr_to_member_type, and it does not describe its use with a structure DIE.

Furthermore, gdb seems to make use of this emission and this is not correct.
>How-To-Repeat:
g++ -gdwarf-2 test.cpp
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="test.cpp"
Content-Disposition: inline; filename="test.cpp"

class A {
public:
    int a1;
};
class c {
public:
    int c1;
};
class B : virtual public A {
public:
    int b2;
};
int main()
{
  B pf;
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: debug/8188: DW_AT_containing_type incorrectly emitted
@ 2002-10-10 11:06 Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2002-10-10 11:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR debug/8188; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@mvista.com>
To: miwako.tokugawa@intel.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: debug/8188: DW_AT_containing_type incorrectly emitted
Date: Thu, 10 Oct 2002 14:02:51 -0400

 On Thu, Oct 10, 2002 at 05:51:04PM -0000, miwako.tokugawa@intel.com wrote:
 > 
 > >Number:         8188
 > >Category:       debug
 > >Synopsis:       DW_AT_containing_type incorrectly emitted
 > >Confidential:   no
 > >Severity:       critical
 > >Priority:       medium
 > >Responsible:    unassigned
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Thu Oct 10 10:56:01 PDT 2002
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     miwako.tokugawa@intel.com
 > >Release:        unknown-1.0
 > >Organization:
 > >Environment:
 > 
 > >Description:
 > It seems that g++ misuses DW_AT_containing_type. If you compile test.cpp (attached), we see this.
 > <1><d5e>: Abbrev Number: 15 (DW_TAG_structure_type)
 >      DW_AT_sibling     : <df0>  
 >      DW_AT_name        : B      
 >      DW_AT_byte_size   : 12     
 >      DW_AT_decl_file   : 1      
 >      DW_AT_decl_line   : 12     
 >      DW_AT_containing_type: <cc4>       
 > Dwarf3 draft (draft7) section 5.12 describes this attribute as being attached DW_TAG_ptr_to_member_type, and it does not describe its use with a structure DIE.
 > 
 > Furthermore, gdb seems to make use of this emission and this is not correct.
 
 GDB uses it to find the virtual table associated with the current type. 
 It's used in two "custom" ways by GCC and GDB:
       /* GNU extension: Record what type this method came from originally.  */
       /* GNU extension: Record what type our vtable lives in.  */
 
 Non-GDB readers will presumably ignore this information.  Why do you
 consider this a bug?
 
 -- 
 Daniel Jacobowitz
 MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-10-10 18:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 10:56 debug/8188: DW_AT_containing_type incorrectly emitted miwako.tokugawa
2002-10-10 11:06 Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).