On 30/09/2011 16:22, Joost van der Sluis wrote:
On Fri, 2011-09-30 at 15:54 +0100, Martin wrote:
Now reading it again, does it mean:
1) gdb can (magically?) get the return value of a function/method, but
WITHOUT calling/invoking the function (e.g. for properties)
2) gdb can "evaluate" the type of a method. e.g return "ptype
Tfoo.Method" = "function(a:int): boolean"
The second. When you do 'p functionname' you get some background
information about the function. When you do 'p functionname()' it will
call the function.

Yep, that's what I figured. Initially I though 1 (and I thought, how?)

This didn't work for methods, so 'p class.methodname()' did work while
'p class.methodname' didn't. That's what's fixed.

The (simple) patch is attached.

But what we could do now is write debuginfo for properties with getters
as if it is a function. The answer of 'p class.propertyname' will tell
you it's a function, which yould be called if you want to.



Yep, I need to improve the IDE to detect functions in expressions, and enable/disable execution, depend on user settings (rather than letting the user type the ()


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to