[Lazarus] Lazarus error

Martin Frb lazarus at mfriebe.de
Tue Apr 8 16:42:20 CEST 2014

On 08/04/2014 15:25, Michael Van Canneyt wrote:
> Hi,
> I wanted to debug a project (testsuite project) in Lazarus, and got 
> some errors at once when hitting run
> I then went to debug on the console with GDB
> Has anyone experienced this before:
> /build/buildd/gdb-7.4-2012.04/gdb/buildsym.c:696: internal-error: 
> failed internal consistency check
> A problem internal to GDB has been detected,
> further debugging may prove unreliable.
> Quit this debugging session? (y or n) n
> I get this error almost regardless of the GDB command I typed...
> I suspect this is what confused the IDE debugger ?

This means that gdb stumbles on reading the dwarf or stabs info.

If your code for some reason does not have FPC_RAISEEXCEPTION, then GDB 
may scan through all units, to find it.
If your code has it, then GDB will scans until it finds that symbol.

If during this scan it encounters debug info that it does not like, then 
you get a crash/assert like that.

Some possibilities
- smart linking can create bad debug info, avoid it
- on windows use -XE external linker
- dont mix stabs and dwarf (make sure packages/rtl use the same as 
prokect (or packages/rtl are without dbg info)
- do not use dwarf3.

More information about the Lazarus mailing list