Hello chaps,
I have looked through the list but cant find anything definitive on this one...
I am using -gstabs to compile as -g on its own gives "internal error - unimplemented function unk_lang_create_fundamental_type called." (as per an earlier post).
I can get things to display by casting them to their type Type(Var) with initial letters capitalised. Where I get really stuck is trying to use this technique on a thingy (its a union in C - I dont know much pascal so I dont know what its called - sorry).
This isnt real code - its so I can try to explain a little better...
TYPE
header = RECORD item1 : WORD; item2 : WORD; item3 : LONGWORD; END;
type1 = PACKED RECORD hdr ; header; custom1 : BYTE; END;
{ you get the idea...}
thingy = RECORD CASE INTEGER OF 1: (member1 : type1); 2: (member2 : type2); 3: (member3 : type3); END;
VAR dummy1 : header; dummy2 : type1; dummy3 : thingy;
From within GDB when the program is running, I can inspect the contents of
dummy1 by doing
p Header(Dummy1) ( I would expect a simple p dummy1 to work but any debug is better than none).
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?
Sorry if this is really amateurish - I am a C programmer that has suddenly inherited a whole load of Pascal and I must admit that I am struggling with the debugger. It works fine for me in C - I am hoping that it is my ignorance that is the cause of the problem.
If there are any publications, online or in print (I have the GPC documentation but it didnt help on this one) that you recommend, please post away.
Thanks for any insight,
Bryan "Brain Murders" Meredith