From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31131 invoked by alias); 7 Jan 2013 19:35:48 -0000 Received: (qmail 31108 invoked by uid 48); 7 Jan 2013 19:35:48 -0000 From: "tromey at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/14998] GDB cannot handle pointer to member functions being encoded with DW_TAG_ptr_to_member_type Date: Mon, 07 Jan 2013 19:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2013-q1/txt/msg00030.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14998 --- Comment #8 from Tom Tromey 2013-01-07 19:35:46 UTC --- (In reply to comment #7) > The DWARF standard is a bit vague on this: > > "The pointer to member entry has a DW_AT_type attribute to describe the type of > the class or structure member to which objects of this type may point." > > but it seems like if the DW_AT_type of a pointer-to-member variable "int > foo::*x;" is simply "int", then the DW_AT_type of a pointer-to-member function > "int (foo::*x)(float)" would be "int(float)". I searched the DWARF standard and didn't see anything requiring this. However, it seems strange to emit the artificial parameter for a method but not for a pointer-to-method. If you really don't want to emit it then I think we ought to file a bug report for the DWARF standard. > If it works, though, then I'd consider this bug to be lower priority but still > 'nice to have' (essentially GDB would detect whether the first parameter is > artificial (& the same type as the DW_AT_containing_type) & if so, use that, > otherwise insert such a parameter based on the DW_AT_containing_type if that's > the representation it prefers). > > What are your thoughts on this? Certainly doable in gdb, but I think it is nicer to agree on a single standard interpretation and try to avoid this kind of adaptive behavior. > I guess LINKAGE_NAME is DW_AT_MIPS_linkage_name? Though in any case a function > pointer won't have a known/fixed name for the function, so I guess it's always > 'zero'/always displayed? It seems to be a boolean flag (to my surprise, I didn't actually read it closely the first time). There's probably some way to arrange for this to work properly. Offhand I don't know why it is this way. It might just be so that people can tell "what is really going on" -- but a flag would suffice for this. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.