On 09/04/2016 21:34, Michael Thompson wrote:
On 8 April 2016 at 17:08, Santiago A. <s...@ciberpiula.net
<mailto:s...@ciberpiula.net>> wrote:
By the way, has anybody managed to debug strings.text or any property
with a getter?
I was hoping someone would answer this. I currently insert the
equivalent of
sHack := MyStrings.Text;
into code, and watch that.... Means I have to know I want the value
of that list before I start debugging...
getters are a long way to go still, and if the strings are involved,
then even longer.
1) gdb does not support function calls to pascal
2) strings are managed, gdb does not know how to deal with them, if they
are needed for function param or result. Special calls to string
management are needed or memory will be leaked or corrupted
3) stabs, dwarf2 & 3 do not support encoding the above info
4) Due to 3 fpc can not make that info avail. (maybe later dwarf formats
have it)
But often you can find the private variable that holds the value, and
watch this.
In Lazarus use the debug INSPECTOR, you can double click any member
variables, and go to nested objects etc. Once you found it copy it to
watches.
for stringlist you can get all individual strings (but not the text).
tstringlist.flist.... somewhere.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal