This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: about how to add support to new c++ compiler in GDB


> You can find the patch, against current CVS GDB, at:
>   http://return.false.org/~drow/gdb/combined-rvct-patches.diff

Got it, a really huge one. :-)

> You should give these a try with xlc++ and see if they help.  If not,
> we'll need to discuss the differences in xlc output.
> 

I just had a try. And it did help. No SEGV error any more. Followed is the
summary report against xlc++(I only run the testcases under gdb.cp directory):

# of expected passes            1514
# of unexpected failures        264
# of unexpected successes       1
# of known failures             29
# of unresolved testcases       2

I had some look at these failure report. Quite a lot of them are contributed by
"__vfp", which is the same as "_vptr.CLASSNAME". GDB treat it as a normal class
member. The debuginfo for "__vfp" is like this:

 <2><36a>: Abbrev Number: 17 (DW_TAG_member)
     DW_AT_name        : __vfp  
     DW_AT_accessibility: 1     (public)
     DW_AT_artificial  : 1      
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_type        : <348> 

 <1><348>: Abbrev Number: 10 (DW_TAG_pointer_type)
     DW_AT_address_class: 0     
     DW_AT_type        : <30c>  

 <1><30c>: Abbrev Number: 16 (DW_TAG_union_type)
     DW_AT_sibling     : <348>
     DW_AT_name        : __vftTypeGCCV3
     DW_AT_byte_size   : 4
     DW_AT_artificial  : 1
 <2><322>: Abbrev Number: 17 (DW_TAG_member)
     DW_AT_name        : __faddr
     DW_AT_accessibility: 1     (public)
     DW_AT_artificial  : 1
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_type        : <2ff>
 <2><334>: Abbrev Number: 17 (DW_TAG_member)
     DW_AT_name        : __offset
     DW_AT_accessibility: 1     (public)
     DW_AT_artificial  : 1
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_type        : <305>  

with which GDB will interpret as: 
  __vftTypeGCCV3 *__vfp;

Would you like to have a look at gdb.log. I could post that if you prefer. 

Thanks

- Wu Zhou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]