Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-04

Lazarus error

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

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 ?

Michael.

Reply by email

Martin Frb
to Michael Van Canneyt
Michael Van Canneyt wrote 20 lines
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.

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.

Reply by email

Michael Van Canneyt
to Martin Frb
Martin Frb wrote 23 lines
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...

Show quoted text 7 lines
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.

Reply by email

Martin Frb
to Michael Van Canneyt
Michael Van Canneyt wrote 30 lines
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. I'll do a objdump, it should give me some info, maybe I'm mixing stabs/dwarf or so.

The other option is to try a different GDB version.

Avoid 7.5.9 to all 7.6.1.
I havent done any tests with 7.7 yet.

Reply by email

Martin Frb
to Martin Frb
Martin Frb wrote 22 lines
On 08/04/2014 15:59, Michael Van Canneyt wrote: > > > 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

Forgot one
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working

GDB searches in libraries, and that too, can cause issues. try set auto-solib-add off

Reply by email