Adding properties into existing stabs/dwarf; gdb readable workaround ? [[Re: [fpc-devel] Status and ideas about debug info (stabs, dwarf / dwar3)]]
Flávio Etrusco
flavio.etrusco at gmail.com
Tue Sep 13 11:31:37 CEST 2011
On Mon, Sep 12, 2011 at 11:42 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> DaWorm schrieb:
>>
>> I don't understand why a property with a getter could ever be ran by a
>> debugger. If I have a property called NextValue, implanted by a method
>> called GetNextValue, that increments a field, stores it in a database, and
>> returns the new value, I absolutely do not want the debugger to execute that
>> even if I'm dumb enough to try to ask it to view that property.
>
> Right, property getters can have side effects, like all procedures. That's
> why I already suggested an hint on property declarations, telling which data
> item should be displayed for the property.
>
> DoDi
>
Yes. Delphi has/had an option to enable function calls/side effects on
property evaluation.
Often times the getter is "pure" (no side-effects, just return a field
value), it's just either virtual or an interface property, or fetched
from an internal helper.
GDB supposedly has support for reverse execution/walking back; I don't
even know whether it really works for C, not to mention FPC calling
conventions, but if it does it would be a killer ;-)
-Flávio
More information about the fpc-devel
mailing list