[fpc-devel] Conditional Breakpoints using FPC and GDB

Dimitri Smits smitco at telenet.be
Fri Aug 13 13:55:43 CEST 2010


----- "Graeme Geldenhuys" <graemeg.lists at gmail.com> schreef:

> On 13 August 2010 13:11, Michael Van Canneyt wrote:
> >
> > Can you explain this ? As far as I know, there no member of the core
> team
> > that objects to having properties inspectable in the debugger ?
> 
> I was obviously generalized a bit too much. If you really want me to,
> I can search the mailing list archive to find out who said what.
> Anyway, it was told many times before that inspecting a property with
> Getter and Setter methods may change underlying data - so the whole
> debugging of Properties are frowned upon.
> 
> I'm simply stating that developers should know what they are doing,
> and that I have never seen a Delphi developer ever complain about
> that
> "possible data change" issue. It's only FPC developers that keep
> mentioning it.

Delphi's debugger has had the possibility to inspect properties for ages. In fact, for watches you had to tick an extra checkbox to allow for function-calling. 

Using a property in delphi is ALWAYS a function-call, even when you use a read=FSomeField specifier. The debugger knows to inspect through the RTTI property-tables and finds which call to make and type to expect.

As for why Delphi devs who don't complain: I for one couldn't get the lazarus-bundled/integrated-debugger to work on windows except for a few trivial cases. (about half a year ago)
Also, using Delphi for this many years now (10+), I guess I must have been spoiled because GDB just doesn't do it for me (and the 100000000000 windows lazarus opens are a nightmare). Stepping in assembler or changing a register didn't work at that time (both trunk and official release) without AV's.

At that time it was stated that the debugger was under construction. So I did the next best thing ever since: develop+debug on Delphi then "port" to fpc.

But instead of complaining, I'd better check the current status.

My point being: when working on windows, coming from Delphi, the debugger needs getting used to and has it's limitations. When you have Delphi, you can use it's debugger.

btw, the whole debugger back-end was written for *nix anyway, especially when you consider the whole "I need a outputwindow for console debugging" vs "that problem does not exist on *nix, just open another terminal and problem solved" discussion of a few weeks back.

ps: will check if my problems still exist with more current Lazarus (latest trunk update was 3 or 4 months ago) and if so, will "complain" in mantis :-)

kind regards,
Dimitri Smits



More information about the fpc-devel mailing list