On Saturday 06 Dec 2003 22:45, Waldek Hebisch wrote:
Bryan Meredith wrote
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.
The problem seem to be that gdb does not know the structure of the `Raaheader' type. It is not a "well known problem". Instead of guessing just post problematic code. Simplify the code, if you can, but make sure that the problem persist after simplification.
By the way, you should be able to print values of variables even if source is not available (description of variables is inside the executable).
I have finally had a chance to put an example together. The pascal files and the output from gdb are available here:
http://www.brainmurders.pwp.blueyonder.co.uk/pascal/
I didn't want to post it all inline but I can if that's what is preferred - the files are quite small.
If you need any more information from me, please ask - I could really do with the help.
Thanks in advance, Bryan "Brain Murders" Meredith