This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] Add a little IBM XL C++ specific code in dwarf2read.c, to set TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE of a virtual class correctly
- From: Daniel Jacobowitz <drow at false dot org>
- To: Wu Zhou <woodzltc at cn dot ibm dot com>
- Cc: ezannoni at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Sun, 12 Jun 2005 23:26:01 -0400
- Subject: Re: [RFC] Add a little IBM XL C++ specific code in dwarf2read.c, to set TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE of a virtual class correctly
- References: <Pine.LNX.4.63.0504301332010.26869@plinuxt18.cn.ibm.com> <20050531025031.GA7983@nevyn.them.org> <Pine.LNX.4.63.0505311108170.9549@plinuxt18.cn.ibm.com>
On Tue, May 31, 2005 at 11:26:52AM +0800, Wu Zhou wrote:
> On Mon, 30 May 2005, Daniel Jacobowitz wrote:
> > I think the change is probably reasonable. Alternatively, we could
> > teach GDB not to rely on TYPE_VPTR_FIELDNO and TYPE_VPTR_BASETYPE if
> > the C++ ABI in use does not require them, which the GNU v3 ABI does
> > not. That would also be a good solution.
>
> Yes. I had ever thought of that and even added a file named xlc-abi.c
> to not rely on these two fields. But I am not sure whether this is the
> most appropriate way. The developer of XL compiler ever told me that
> they also comply to the GNU C++ ABI. Maybe it is acceptable to code
> that change in gnu-v3-abi.c. My question is: which one is better and
> more prone to be accepted by mainline? Any comments, suggestion and
> idea are highly appreciated!
Right - I did not mean adding a new file for xlc (which you should not
need to do), but modifying the GNU v3 support and common code instead.
I think that fixing this would be more work, but also more correct.
I haven't really looked yet at how much work it would be.
--
Daniel Jacobowitz
CodeSourcery, LLC