On Saturday 06 Dec 2003 02:28, Waldek Hebisch wrote:
How do I get it to display member2 (assuming that member2 is the relevent member). I can tell which structure to use as there is a variable that has been set. Out of interest, is there a way of telling which member is the relevent one just by looking at dummy3?
A little correction. I wrote that there is problem with variant records and gdb. However, after checking I see that the problem is limited, gdb just does not print names (selector values) corresponding to variants. You can print members:
(gdb) print dummy3 $7 = { = { = {Member1 = {Hdr = {Item1 = 0, Item2 = 0, Item3 = 0}, Custom1 = 0}}, = {Member2 = []}, = {Member3 = 0}}} (gdb) print dummy3.Member1 $8 = {Hdr = {Item1 = 0, Item2 = 0, Item3 = 0}, Custom1 = 0} (gdb)
Thats interesting.
The problem I get is that gdb complains of incomplete types.
(gdb) p Raatimer(M_msgbuf) $7 = {Daaheader = <incomplete type>, Iaaatcode = 5, Iaafil = 0} (gdb) p M_msgbuf $8 = <incomplete type> (gdb) p M_msgbuf.Daaheader A parse error in expression, near `Daaheader'. (gdb) p Raaheader(M_msgbuf.Daaheader) A parse error in expression, near `Daaheader)'.
As you can see, I cant get to Daaheader.
I wonder is this is anything to do with the fact that the types are all declared in other units and brought in with the uses clause? I have a .gdbinit file to ensure that it can see the source directories.