This is the mail archive of the gdb-prs@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]

breakpoints/950: GDB problem: incompatible object model (virtual inheritance class.)


>Number:         950
>Category:       breakpoints
>Synopsis:       GDB problem: incompatible object model (virtual inheritance class.)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 20 11:38:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     sana@stl.sarov.ru
>Release:        unknown-1.0
>Organization:
>Environment:
32-bit && 64-bit Linux (Reg Hat 7.2)
>Description:
GBD is not able to recognize debug information for classes with virtual inheritance.

Example of debug session with GDB:
This GDB was configured as "i386-redhat-linux"...
(gdb) b 35
Breakpoint 1 at 0x8048cad: file virtual_02.cpp, line 35.
(gdb) r
Starting program: /home1/sana/trackers/GDB/tr21058/gdbCpp/opt_none_debug/virtual_02.exe 

Breakpoint 1, main () at virtual_02.cpp:35
35      }
(gdb) p pc
$1 = (C *) 0x804c7a8
(gdb) p *pc
$2 = {<A> = {<V> = <invalid address>, _vptr.A = void, a = 0, aa = 0}, <B> = {
    _vptr.B = void, b = 2}, c = 0}
(gdb) p (class V)*pc
virtual baseclass botch
(gdb)

Example of debug session with IDB (for the same executable file):

object file name: virtual_02.exe 
Reading symbolic information ...done
(idb) b 35
[#1: stop at "virtual_02.cpp":35 ]
(idb) r
[1] stopped at [void main(void):35 0x8048cad]
     35 }
(idb) p *pc
class C {
  c = 0; 
  a = 0;                          // class A
  aa = 0;                         // class A 
  v = 1;                          // class A::V
  vv = 11;                        // class A::V 
  b = 2;                          // class B
}
(idb) p (class V)*pc
class V {
  v = 1;
  vv = 11;
}
(idb) 

It looks like that debug information is correct:
<1><e7>: Abbrev Number: 2 (DW_TAG_class_type)
     DW_AT_sibling     : <123>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 8      
     DW_AT_name        : V      
 <2><f0>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_decl_line   : 4      
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_name        : v      
     DW_AT_type        : <123>  
 <2><fd>: Abbrev Number: 4 (DW_TAG_member)
     DW_AT_decl_line   : 6      
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_data_member_location: 2 byte block: 23 4     (DW_OP_plus_uconst: 4)
     DW_AT_name        : vv     
     DW_AT_type        : <123>  
 <2><10c>: Abbrev Number: 5 (DW_TAG_subprogram)
     DW_AT_decl_line   : 7      
     DW_AT_decl_column : 2      
    DW_AT_decl_file   : 1      
     DW_AT_sibling     : <122>  
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : V      
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
 <3><11c>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <132>  
 <1><123>: Abbrev Number: 7 (DW_TAG_base_type)
     DW_AT_byte_size   : 4      
     DW_AT_encoding    : 5      (signed)
     DW_AT_name        : int    
 <1><12a>: Abbrev Number: 7 (DW_TAG_base_type)
     DW_AT_byte_size   : 0      
     DW_AT_encoding    : 5      (signed)
     DW_AT_name        : void   
 <1><132>: Abbrev Number: 8 (DW_TAG_pointer_type)
     DW_AT_byte_size   : 4      
     DW_AT_type        : <e7>   
 <1><138>: Abbrev Number: 9 (DW_TAG_subprogram)
     DW_AT_decl_line   : 7      
     DW_AT_decl_column : 2      
     DW_AT_decl_file   : 1      
   DW_AT_sibling     : <164>  
     DW_AT_specification: <10c> 
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : V      
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
     DW_AT_high_pc     : 0x804a9e0 134523360    
     DW_AT_low_pc      : 0x804a9b4 134523316    
     DW_AT_external    : 1      
 <2><155>: Abbrev Number: 10 (DW_TAG_formal_parameter)
     DW_AT_type        : <164>  
     DW_AT_artificial  : 1      
     DW_AT_name        : this   
     DW_AT_location    : 2 byte block: 75 7c    (DW_OP_breg5: -4)
 <1><164>: Abbrev Number: 11 (DW_TAG_const_type)
     DW_AT_type        : <132>  
 <1><169>: Abbrev Number: 12 (DW_TAG_subprogram)
     DW_AT_decl_line   : 30     
     DW_AT_decl_column : 6      
     DW_AT_decl_file   : 1      
     DW_AT_sibling     : <196>  
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : main   
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
     DW_AT_high_pc     : 0x8048cd0 134515920    
     DW_AT_low_pc      : 0x8048be8 134515688    
     DW_AT_external    : 1      
 <2><185>: Abbrev Number: 13 (DW_TAG_variable)
     DW_AT_decl_line   : 32     
     DW_AT_decl_column : 8      
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : pc     
     DW_AT_type        : <196>  
     DW_AT_location    : 2 byte block: 75 74    (DW_OP_breg5: -12)
     DW_AT_external    : 0      
 <1><196>: Abbrev Number: 8 (DW_TAG_pointer_type)
     DW_AT_byte_size   : 4      
     DW_AT_type        : <19c>  
 <1><19c>: Abbrev Number: 2 (DW_TAG_class_type)
     DW_AT_sibling     : <1e6>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 32     
     DW_AT_name        : C      
 <2><1a5>: Abbrev Number: 14 (DW_TAG_inheritance)
    DW_AT_decl_line   : 23     
     DW_AT_decl_column : 18     
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_type        : <1e6>  
 <2><1b1>: Abbrev Number: 14 (DW_TAG_inheritance)
     DW_AT_decl_line   : 23     
     DW_AT_decl_column : 28     
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_data_member_location: 2 byte block: 23 c     (DW_OP_plus_uconst: 12)
     DW_AT_type        : <24c>  
 <2><1bd>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_decl_line   : 24     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_data_member_location: 2 byte block: 23 14    (DW_OP_plus_uconst: 20)
     DW_AT_name        : c      
     DW_AT_type        : <123>  
 <2><1ca>: Abbrev Number: 5 (DW_TAG_subprogram)
     DW_AT_decl_line   : 25     
     DW_AT_decl_column : 10     
    DW_AT_decl_file   : 1      
     DW_AT_sibling     : <1e5>  
     DW_AT_accessibility: 3     (private)
     DW_AT_name        : h      
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
 <3><1da>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <196>  
 <3><1df>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <123>  
 <1><1e6>: Abbrev Number: 2 (DW_TAG_class_type)
     DW_AT_sibling     : <246>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 20     
     DW_AT_name        : A      
 <2><1ef>: Abbrev Number: 15 (DW_TAG_inheritance)
     DW_AT_decl_line   : 10     
     DW_AT_decl_column : 26     
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_data_member_location: 7 byte block: 12 6 10 c 1c 6 22        (DW_OP_d
upDW_OP_derefDW_OP_constu: 12DW_OP_minusDW_OP_derefDW_OP_plus)
     DW_AT_type        : <e7>   
    DW_AT_virtuality  : 1      (virtual)
 <2><201>: Abbrev Number: 16 (DW_TAG_member)
     DW_AT_name        : _vptr.A        
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_artificial  : 1      
 <2><20e>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_decl_line   : 11     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_data_member_location: 2 byte block: 23 4     (DW_OP_plus_uconst: 4)
     DW_AT_name        : a      
     DW_AT_type        : <123>  
 <2><21b>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_decl_line   : 12     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_data_member_location: 2 byte block: 23 8     (DW_OP_plus_uconst: 8)
     DW_AT_name        : aa     
     DW_AT_type        : <123>  
 <2><229>: Abbrev Number: 5 (DW_TAG_subprogram)
     DW_AT_decl_line   : 14     
     DW_AT_decl_column : 10     
     DW_AT_decl_file   : 1      
     DW_AT_sibling     : <245>  
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : af     
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
 <3><23a>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <246>  
 <3><23f>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <123>  
 <1><246>: Abbrev Number: 8 (DW_TAG_pointer_type)
     DW_AT_byte_size   : 4      
     DW_AT_type        : <1e6>  
 <1><24c>: Abbrev Number: 2 (DW_TAG_class_type)
     DW_AT_sibling     : <29e>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 16     
     DW_AT_name        : B      
 <2><255>: Abbrev Number: 15 (DW_TAG_inheritance)
     DW_AT_decl_line   : 17     
     DW_AT_decl_column : 26     
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_data_member_location: 7 byte block: 12 6 10 c 1c 6 22        (DW_OP_dupDW_OP_derefDW_OP_constu: 12DW_OP_minusDW_OP_derefDW_OP_plus)
     DW_AT_type        : <e7>   
     DW_AT_virtuality  : 1      (virtual)
 <2><267>: Abbrev Number: 16 (DW_TAG_member)
     DW_AT_name        : _vptr.B        
     DW_AT_data_member_location: 2 byte block: 23 0     (DW_OP_plus_uconst: 0)
     DW_AT_artificial  : 1      
 <2><274>: Abbrev Number: 3 (DW_TAG_member)
     DW_AT_decl_line   : 18     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_data_member_location: 2 byte block: 23 4     (DW_OP_plus_uconst: 4)
     DW_AT_name        : b      
     DW_AT_type        : <123>  
 <2><281>: Abbrev Number: 5 (DW_TAG_subprogram)
     DW_AT_decl_line   : 37     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_sibling     : <29d>  
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : bf     
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
<3><292>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <29e>  
 <3><297>: Abbrev Number: 6 (DW_TAG_formal_parameter)
     DW_AT_type        : <123>  
 <1><29e>: Abbrev Number: 8 (DW_TAG_pointer_type)
     DW_AT_byte_size   : 4      
     DW_AT_type        : <24c>  
 <1><2a4>: Abbrev Number: 9 (DW_TAG_subprogram)
     DW_AT_decl_line   : 37     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_sibling     : <2df>  
     DW_AT_specification: <281> 
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : bf     
     DW_AT_type        : <12a>  
     DW_AT_prototyped  : 1      
     DW_AT_high_pc     : 0x8048cf2 134515954    
     DW_AT_low_pc      : 0x8048cd0 134515920    
     DW_AT_external    : 1      
 <2><2c2>: Abbrev Number: 10 (DW_TAG_formal_parameter)
     DW_AT_type        : <2df>  
     DW_AT_artificial  : 1      
    DW_AT_name        : this   
     DW_AT_location    : 2 byte block: 75 8     (DW_OP_breg5: 8)
 <2><2d0>: Abbrev Number: 17 (DW_TAG_formal_parameter)
     DW_AT_decl_line   : 37     
     DW_AT_decl_column : 16     
     DW_AT_decl_file   : 1      
     DW_AT_type        : <123>  
     DW_AT_name        : ii     
     DW_AT_location    : 2 byte block: 75 c     (DW_OP_breg5: 12)
 <1><2df>: Abbrev Number: 11 (DW_TAG_const_type)
     DW_AT_type        : <29e>  
 <1><2e4>: Abbrev Number: 13 (DW_TAG_variable)
     DW_AT_decl_line   : 28     
     DW_AT_decl_column : 9      
     DW_AT_decl_file   : 1      
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : x      
     DW_AT_type        : <19c>  
     DW_AT_location    : 5 byte block: 3 7c c7 4 8      (DW_OP_addr: 804c77c)
     DW_AT_external    : 1      
 <1><2f6>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTV1A 
   DW_AT_type        : <30a>  
     DW_AT_location    : 5 byte block: 3 4 c1 4 8       (DW_OP_addr: 804c104)
     DW_AT_external    : 1      
 <1><30a>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <317>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 12     
 <2><314>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 2      
 <1><317>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTT1A 
     DW_AT_type        : <32b>  
     DW_AT_location    : 5 byte block: 3 10 c1 4 8      (DW_OP_addr: 804c110)
     DW_AT_external    : 1      
 <1><32b>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <338>  
     DW_AT_type        : <338>  
     DW_AT_byte_size   : 4      
 <2><335>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 0      
 <1><338>: Abbrev Number: 8 (DW_TAG_pointer_type)
     DW_AT_byte_size   : 4      
    DW_AT_type        : <123>  
 <1><33e>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTV1B 
     DW_AT_type        : <352>  
     DW_AT_location    : 5 byte block: 3 14 c1 4 8      (DW_OP_addr: 804c114)
     DW_AT_external    : 1      
 <1><352>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <35f>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 12     
 <2><35c>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 2      
 <1><35f>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTT1B 
     DW_AT_type        : <373>  
     DW_AT_location    : 5 byte block: 3 20 c1 4 8      (DW_OP_addr: 804c120)
     DW_AT_external    : 1      
 <1><373>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <380>  
     DW_AT_type        : <338>  
     DW_AT_byte_size   : 4      
<2><37d>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 0      
 <1><380>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTV1C 
     DW_AT_type        : <394>  
     DW_AT_location    : 5 byte block: 3 24 c1 4 8      (DW_OP_addr: 804c124)
     DW_AT_external    : 1      
 <1><394>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <3a1>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 24     
 <2><39e>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 5      
 <1><3a1>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTT1C 
     DW_AT_type        : <3b5>  
     DW_AT_location    : 5 byte block: 3 3c c1 4 8      (DW_OP_addr: 804c13c)
     DW_AT_external    : 1      
 <1><3b5>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <3c2>  
     DW_AT_type        : <338>  
    DW_AT_byte_size   : 16     
 <2><3bf>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 3      
 <1><3c2>: Abbrev Number: 21 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTVN10__cxxabiv121__vmi_class_type_infoE      
     DW_AT_type        : <3f4>  
     DW_AT_declaration : 1      
     DW_AT_external    : 1      
 <1><3f4>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <401>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 0      
 <2><3fe>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 255    
 <1><401>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTI1A 
     DW_AT_type        : <415>  
     DW_AT_location    : 5 byte block: 3 6c c1 4 8      (DW_OP_addr: 804c16c)
     DW_AT_external    : 1      
 <1><415>: Abbrev Number: 22 (DW_TAG_structure_type)
     DW_AT_sibling     : <434>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 24     
     DW_AT_name        : __vmi_class_type_info_1        
 <1><434>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTI1B 
     DW_AT_type        : <415>  
     DW_AT_location    : 5 byte block: 3 84 c1 4 8      (DW_OP_addr: 804c184)
     DW_AT_external    : 1      
 <1><448>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTI1C 
     DW_AT_type        : <45c>  
     DW_AT_location    : 5 byte block: 3 4c c1 4 8      (DW_OP_addr: 804c14c)
     DW_AT_external    : 1      
 <1><45c>: Abbrev Number: 22 (DW_TAG_structure_type)
     DW_AT_sibling     : <47b>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 32     
     DW_AT_name        : __vmi_class_type_info_2        
 <1><47b>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTC1C0_1A     
    DW_AT_type        : <493>  
     DW_AT_location    : 5 byte block: 3 b0 bb 4 8      (DW_OP_addr: 804bbb0)
     DW_AT_external    : 0      
 <1><493>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <4a0>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 12     
 <2><49d>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 2      
 <1><4a0>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTC1C12_1B    
     DW_AT_type        : <4b9>  
     DW_AT_location    : 5 byte block: 3 bc bb 4 8      (DW_OP_addr: 804bbbc)
     DW_AT_external    : 0      
 <1><4b9>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <4c6>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 12     
 <2><4c3>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 2      
 <1><4c6>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
    DW_AT_name        : _ZTI1V 
     DW_AT_type        : <4da>  
     DW_AT_location    : 5 byte block: 3 9c c1 4 8      (DW_OP_addr: 804c19c)
     DW_AT_external    : 1      
 <1><4da>: Abbrev Number: 22 (DW_TAG_structure_type)
     DW_AT_sibling     : <4f3>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 8      
     DW_AT_name        : __class_type_info      
 <1><4f3>: Abbrev Number: 21 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
     DW_AT_name        : _ZTVN10__cxxabiv117__class_type_infoE  
     DW_AT_type        : <521>  
     DW_AT_declaration : 1      
     DW_AT_external    : 1      
 <1><521>: Abbrev Number: 19 (DW_TAG_array_type)
     DW_AT_sibling     : <52e>  
     DW_AT_type        : <123>  
     DW_AT_byte_size   : 0      
 <2><52b>: Abbrev Number: 20 (DW_TAG_subrange_type)
     DW_AT_upper_bound : 255    
 <1><52e>: Abbrev Number: 18 (DW_TAG_variable)
     DW_AT_accessibility: 1     (public)
    DW_AT_name        : __link 
     DW_AT_type        : <542>  
     DW_AT_location    : 5 byte block: 3 c8 bb 4 8      (DW_OP_addr: 804bbc8)
     DW_AT_external    : 0      
 <1><542>: Abbrev Number: 23 (DW_TAG_structure_type)
     DW_AT_sibling     : <549>  
     DW_AT_accessibility: 1     (public)
     DW_AT_byte_size   : 12     
>How-To-Repeat:
Regression test is attached or below:

// Virtual base class test. C derive A & B and both A & B derive virtual V.

class V {
    int v;
public:
    int vv;
        V() {v=1;vv=2;};
};

class A : virtual public V{
    int a;
    int aa;
public:
    void af(int);
};

class B : virtual public V {
    int b;
public:
    void bf(int);
};

class C : public A, public B {
    int c;
    void h(int);
};

class C x;

void main()
{
    C* pc = new C;

    pc->bf(2);
}

void B::bf(int ii) {
  b = ii;
  vv = 11;
}

Intel compiler should be used.
Command line is 'icc -g virtual_02.cpp'. 

It is necessary to note that if file is compiled by G++ (with -gdwarf-2) then GDB works correctly.
Probably GDB is oriented to old obhect model.
>Fix:

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

// Virtual base class test. C derive A & B and both A & B derive virtual V.

class V {
    int v;
public:
    int vv;
	V() {v=1;vv=2;};
};

class A : virtual public V{
    int a;
    int aa;
public:
    void af(int);
};

class B : virtual public V {
    int b;
public:
    void bf(int);
};

class C : public A, public B {
    int c;
    void h(int);
};

class C x;

void main()
{
    C* pc = new C;

    pc->bf(2);
}

void B::bf(int ii) {
  b = ii;
  vv = 11;
}


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