From: "Wu Zhou" <woodzltc@cn.ibm.com>
To: "Daniel Jacobowitz" <drow@false.org>
Cc: <gdb-patches@sources.redhat.com>
Subject: Re: about how to add support to new c++ compiler in GDB
Date: Tue, 26 Apr 2005 09:53:00 -0000 [thread overview]
Message-ID: <01cf01c54a45$899fb070$7286b509@ibmcsdl9m89c83> (raw)
In-Reply-To: <20050426031822.GA4998@nevyn.them.org>
> On Tue, Apr 26, 2005 at 10:53:03AM +0800, Wu Zhou wrote:
> > Hello Daniel and all,
> >
> > I am recently running GDB testsuite against IBM's xlc compiler, and
found
> > some problems with c++ testcases, especially while handling
virtual-table
> > related stuff. After some analysis, I found there are some difference
> > between the debuginfo output between xlc++ and g++. The main difference
I
> > noted now is that the class in xlc++ didn't depend on
DW_TAG_containing_type
> > to find its virutal function table. Instead, every virtual class in
xlc++
> > had its own "__vfp", which act the same role as "_vptr.CLASSNAME" in
g++.
> > This will make gdb crash (SEGV) on quite a few c++ testcase.
>
> I have some patches for this, originally developed for the ARM RVCT
> compiler. I haven't had the time to clean them up and post them.
> They will probably be helpful to you.
>
> If I haven't posted them by the end of this week, please, remind me.
Thank you, Daniel! I am very glad to try your patch.
>
> > I am now considering add some code in GDB to fix this. After doing some
> > search in this mail-list, I found there are some discussion on similar
> > problem before, such as
http://sourceware.org/ml/gdb/2004-12/msg00077.html.
> > So I think maybe some of you might have experience or thought or idea on
> > this already. So I write this mail to ask for your expert advice:
> >
> > 1. To support a new c++ compiler, what work need to bo done? I am now
> > thinking of is a new source file(maybe xlc-abi.c) to register its own
cp-abi
> > operation, and some tweak in dwarf2read.c to let GDB understand xlc
specific
> > debuginfo. Any else places need my special attention? Please advice.
>
> Do you need an xlc-abi.c? What ABI does this compiler follow? If it
> doesn't follow the Itanium C++ ABI or one of the older GNU ABIs, then
> considerably more work may be required.
I am not very sure. They(the developer of xlc) said that they also follow
GNU V3 C++ ABI. But there are quite a few difference between the debuginfo
generated by g++ and xlc++. An new file named xlc-abi.c is what I could
thought of at this time. It could verify my idea, and at the same time not
impact the debugging of g++ code. If the changes is not big, maybe we could
integrate them back into gnu-v3-abi.c at last.
>
> Is its ABI documented?
>
I am not very sure. I need to ask the compiler developer.
> > 2. while coding this support, what design consideration I need to take
into
> > account? Is there any document on this? GDB internal didn't mention
this.
> > Maybe there are some in somebody's mind, would you like to share with
me?
> > Thanks a lot. :-)
>
> I'd be glad to answer more specific questions, but I've not got any
> answers for this general one.
>
> Do you have arangements for copyright assignment? I don't know how
> exactly that works in IBM, but I suspect it's complicated.
My manager are arranging this for me. Do I need to assign any document
myself? If yes, I am very glad to do so.
>
> > 3. To verify that my code does work ok and don't bring any other
> > side-effect, what I need to take into account? Running the testsuite
against
> > the modified code might be a help. Any specific area need some more
> > attention?
>
> Testing with already supported C++ compilers is very important. It's
> easy to fix one ABI and break another.
Thanks. I will keep this in mind.
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
next prev parent reply other threads:[~2005-04-26 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 2:54 Wu Zhou
2005-04-26 3:18 ` Daniel Jacobowitz
2005-04-26 9:53 ` Wu Zhou [this message]
2005-04-26 13:20 ` Daniel Jacobowitz
2005-04-27 20:09 ` Daniel Jacobowitz
[not found] ` <019101c54bc9$20360cd0$4186b509@ibmcsdl9m89c83>
[not found] ` <20050428131902.GB29277@nevyn.them.org>
2005-04-29 2:37 ` Wu Zhou
2005-04-29 7:28 ` Wu Zhou
2005-04-29 13:10 ` Daniel Jacobowitz
2005-04-28 6:34 woodzltc
2005-05-09 12:42 Wu Zhou
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='01cf01c54a45$899fb070$7286b509@ibmcsdl9m89c83' \
--to=woodzltc@cn.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sources.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