Variations on inherit.exp

Luis Machado <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
Hi,

So it looks like we have a few variations for outputs of multiply 
inherited objects, and it is hard to know exactly who is doing the right 
thing.

Take, for example, x86 built with GCC 4.7.2, i see this when printing 
g_vD and g_vE.

g_vD

{<vB> = {<vA> = {va = 19, vx = 20}, _vptr.vB = 0x401260 <vtable for 
vD+64>, vb = 21, vx = 22}, <vC> = {_vptr.vC = 0x401278, vc = 23, vx = 
24}, _vptr.vD = 0x401248 <vtable for vD+40>, vd = 25, vx = 26}

g_vE

{<vD> = {<vB> = {<vA> = {va = 0, vx = 0}, _vptr.vB = 0x4010f0 <vtable 
for vE+112>, vb = 0, vx = 0}, <vC> = {_vptr.vC = 0x401108, vc = 0, vx = 
0}, _vptr.vD = 0x4010d8 <vtable for vE+88>, vd = 0, vx = 0}, _vptr.vE = 
0x4010b0 <vtable for vE+48>, ve = 27, vx = 28}

Now, for ppc64 with GCC 4.6.3 i see this:

g_vD

{<vB> = {<vA> = {va = 19, vx = 20}, _vptr.vB = 0x100131c8 <vtable for 
vD+64>, vb = 21, vx = 22}, <vC> = {_vptr.vC = 0x100131e0 <VTT for vD>, 
vc = 23, vx = 24}, _vptr.vD = 0x100131b0 <vtable for vD+40>, vd = 25, vx 
= 26}

g_vE

{<vD> = {<vB> = {<vA> = {va = 0, vx = 0}, _vptr.vB = 0x100130a0 <vtable 
for vE+112>, vb = 0, vx = 0}, <vC> = {_vptr.vC = 0x100130b8 <VTT for 
vE>, vc = 0, vx = 0}, _vptr.vD = 0x10013088 <vtable for vE+88>, vd = 0, 
vx = 0}, _vptr.vE = 0x10013060 <vtable for vE+48>, ve = 27, vx = 28}

Both examples show correct values for all the data members, but the 
difference is in the symbolic representation of some of the vtable 
pointers. ppc64 seems to go for <VTT for> with this specific GCC 
version, but x86 goes with a plain address print (with no symbol 
references).

Should we add one more variation of output to inherit.exp? Should the 
testcase be less picky about the symbolic information?

Luis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.