[Lazarus] Failing to run GDB via IDE on OpenSUSE 13.2 system
Martin Frb
lazarus at mfriebe.de
Mon Feb 9 20:41:39 CET 2015
On 09/02/2015 17:28, Graeme Geldenhuys wrote:
> Hi,
>
> Last week I setup a new VM with OpenSUSE 13.2 64-bit. I also installed
> GDB (v7.8) from the standard package repository.
>
> I manually installed FPC 2.6.4 (tar.gz release archive) and Lazarus
> trunk. I can compile and run programs without problem. I also configured
> GDB in the IDE and made sure my program compiles with debug info
> enabled. But trying to debug an application via Lazarus IDE gives me an
> instant "Internal Error" and GDB stops.
With an "oops the debugger ..." message?
> Below is the IDE debugger window
> output:
...
>
> &"../../gdb/minsyms.c:410: internal-error: Section index is
> uninitialized\nA problem internal to GDB has been detected,\nfurther
> debugging may prove unreliable."
> ====================================================
>
This means gdb crashed.
I noted in my tests that gdb 7.8.0 and gdb 7.8.1 crash way easier than
the 7.7 versions. I recommend to downgrade gdb.
Since you use Lazarus trunk, you can also install the package
components\lazdebuggers\lazdebuggerfp\lazdebuggerfp.lpk
and try to change (in tools / options / debugger) to "fpdebug" (the one
that does NOT say "with gdb") which is gdb free. However this is beta,
so not yet perfect.
As for it work in ddd. (which use gdb too does it?)
That is possible. Those crashes often happen on specific commands, or
when trying to inspect specific data (or a none existing identifier,
which may lead to gdb searching through (and touching) all symbols,
including those that lead to a crash).
Lazarus issues a lot more (or at least different) commands and queries
more info than ddd, because it attempts to make pascal expression,
readable to gdb. It also works around other issues of gdb such as
explicitly dereferencing the hidden pointers in (dyn) arrays or objects
if gdb needs this.
It also sends more initialization, attempting to figure what is possible
in your version of gdb, and what not.
As for the particular crash: This is the first time I see it crash at
"ptype TObject"
Does your code use any objects/classes at all? If not maybe just add one
for debugging?
More information about the Lazarus
mailing list