[fpc-devel] Re: Debugger for FPC

dmitry boyarintsev skalogryz.lists at gmail.com
Sat Mar 14 09:46:24 CET 2009


> 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 with
> 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.

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:
var
  a, b : AnsiString;
begin
  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.
end;

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?



More information about the fpc-devel mailing list