[fpc-devel] Re: Debugger for FPC
jonas.maebe at elis.ugent.be
Sat Mar 14 09:58:35 CET 2009
On 14 Mar 2009, at 09:46, dmitry boyarintsev wrote:
>> No, it's guaranteeing future compatibility, because by using a
>> property you
>> ensure that you can later on replace the setter with a procedure if
>> necessary, without breaking existing source code (at least in FPC
>> 2.3.1; FPC
>> 2.2.x misses several checks, allowing you to do all sorts of things
>> properties directly mapped to fields that should not be possible).
> but, if reading a property is bound to a field. and setting is bound
> to a setting procedure.
> Changing the property is incorrect by writting into the field, instead
> of calling the setting procedure.
You mean changing the property by using the debugger? Then, yes, but I
don't consider that a big problem at this time. Currently, you can
choose between having no debug information at all, or the ability to
potentially wrongly change a property.
> btw, is there an information about string processing functions? (i
> guess it can be included if rebuild rtl with debug info).
> for example, when debugging strings (ansi or wide, not shortstrings)
> it's necessary to change their values, using string processing
> functions, instead of changing their values as PChar or PWideChar?
> AFAIK, gdb is not aware of it, and treats strings as PChar?
> for example:
> a, b : AnsiString;
> a := 'hello';
> b := a;
> writeln(a); // i set a break point here, and change a value to
> 'hello world';
> writeln(b); // b should not change.
> AFAIK, setting values is not implemented is Lazarus yet, but will be
> in future.
> This way of value changing works in delphi.
> To set the string value, it's necessary to know the string setting
> procedure address, can this additional information be added to DWARF
> too? so debugger can use it if necessary?
No, that would require extensions to the debug info format.
More information about the fpc-devel