[fpc-pascal] console gdb in mac

Joost van der Sluis joost at cnoc.nl
Mon Sep 8 17:34:55 CEST 2014


On 09/07/2014 05:19 PM, Felipe Monteiro de Carvalho wrote:
> Hello,
>
> I'm trying to debug lcl-cocoa, but the debugger in the IDE is not
> helping (not stopping in breakpoints inside the LCL, can't read
> variable names, etc...)
>
> So I moved to the console gdb, and I can already break, step over, etc.
>
> But, how to read variable names? I guess a wierd mangling will be
> involved here =)
>
> In particular, let's say I am here:
>
> procedure TControl.SetParent(NewParent: TWinControl);
> begin
>    if FParent = NewParent then exit; <<--- here
>
> How can I read the value of field FParent which is located in object "Self" ?

That's not that difficult:

p this
p this.fparent

If it does not work, try 'THIS' and 'THIS.FPARENT'.

Joost.







More information about the fpc-pascal mailing list