[Lazarus] Lazarus error

Michael Van Canneyt michael at freepascal.org
Tue Apr 8 16:59:03 CEST 2014



On Tue, 8 Apr 2014, Martin Frb wrote:

> 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:
>> 
>> (gdb) break FPC_RAISEEXCEPTION
>> /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.

hm...

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

I assumed something like that, the 'buildsym.c' hints at it...

>
> Some possibilities
> - smart linking can create bad debug info, avoid it

Never use it.

> - on windows use -XE external linker

Not on windows.

> - dont mix stabs and dwarf (make sure packages/rtl use the same as prokect 
> (or packages/rtl are without dbg info)

Ehm... The latter should not be a problem ?  I seldom have a RTL/packages with debug info,
it has not yet presented me with problems...

> - do not use dwarf3.

I'll do a objdump, it should give me some info, maybe I'm mixing stabs/dwarf or so.

Thanks for the tips!

Michael.




More information about the Lazarus mailing list