[Lazarus] Lazarus debug issues

JoshyFun joshyfun at gmail.com
Mon Nov 9 14:02:03 CET 2009


Hello Lazarus-List,

Monday, November 9, 2009, 9:21:56 AM, you wrote:

i> Recently I've written a console application using Lazarus. It had an Access
i> violation, and why gdb (that I used on my own) told me about one line, when
i> I execute it on Lazarus, Lazarus pointed on a different line. It just happen
i> that Lazarus pointed on the line where i should have initialized the
i> variable (but instead just made an "empty" initialization), while GDB
i> pointed on the point I used the non initialized variable.
i> So my question is, how did Lazarus knew to point on the proper line that was
i> not the same line as GDB's ?

GDB and Lazarus (well, fpc) sometimes does not agree about the line to
be shown, sometimes the debugged line is one line below so you are
watching in Lazarus the previously executed line.

This effect seems to be some kind of misunderstood between fpc debug
info and gdb (gdb 7.0 seems to be more precise in this field) but I
was unable to find the gilty of such behavior.

This could also happend when you do not full recompile the code and
debug an ".inc" file, as this file may had not been recompiled at all
because the ".pas" one was not modified.

Check the "debugger output window" for the returned line number on
each step, you'll find it at the end of the last line.

-- 
Best regards,
 JoshyFun





More information about the Lazarus mailing list