[fpc-devel] Re: Debugger for FPC

Michael Van Canneyt michael at freepascal.org
Thu Mar 12 11:34:51 CET 2009



On Thu, 12 Mar 2009, Vincent Snijders wrote:

> Jonas Maebe schreef:
> > Vincent Snijders wrote on do, 12 mrt 2009:
> > 
> > > I guess the fpc developers traded debuggability for maintainability, so
> > > you could have a better fpc (more features or less bugs). That is what
> > > it concerns to you as developer. Maybe you disagree with that trade off.
> > 
> > No, it's simply an unimplemented feature. In fact, I for one didn't even
> > realise that absolute variables were not included in the debug information
> > (they're not used that much in the compiler itself).
> 
> I was referring to the fact that the FPC RTL uses an absolute variable
> Var
> 
>    { Character to be put between date, month and year }
>    DateSeparator: char absolute DefaultFormatSettings.DateSeparator;
> 
> instead of just
> Var
>   DateSepator: char.
> 
> I speculated that is was to have more maintainable code, so. The drawback is
> that you cannot view the contents, because the compiler doesn't seem to
> generate the correct debug info for it (yet).
> 
> Apparently this trade off has been made unconsciously.

The construct with absolute was necessary to fix some other bugs/features in
a more or less efficient manner. The debugging issue was never even
considered. 

Michael.

> 
> > 
> > I've also never seen a bug report about this fact. And although I realise
> > that it may not be obvious that some variable is not visible due to the fact
> > that it's an absolute variable, simply a bug report about "variable x of
> > unit y is not visible to the debugger" would have been enough.
> 
> Who volunteers to create it?
> 
> > 
> > So when something does not work in the debugger, do not automatically assume
> > that it's because GDB is supposedly so bad. It may just as well be a bug in
> > the compiler.
> > 
> 
> I did not, it was clear from earlier posts, that it the compiler doesn't
> write out this information (yet). OTOH, I did not know this a week ago and
> would have blamed Lazarus' interface with the debugger. ;-)
> 
> Vincent
> 
> 
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 
> 



More information about the fpc-devel mailing list