GDB problems

Hi all,

I am trying to debug a large C++ project with GDB/DDD but I am having great
difficulty at the moment as the debugger hangs (i.e. remains busy
indefinitely, uses 100% of the processor) when I open some source files. It
will also hang when I step through code in other files that will actually
open or if I attempt a backtrace at any time.
If the debugging problem is caused by the application itself, is there a
workaround? Obviously if I can’t open all the source files I can’t debug
them!
I am using Momentics PE 6.2.1A IDE to compile and link.

As always, any help is much appreciated,
Ronan K


PS If anybody is interested I can make the source code and executable
available to reproduce the problem.
The program itself makes heavy use of the STL (if that is relevant) and
compiles and runs without difficulty in Linux and Windows. It runs in QNX
too but returns rubbish values (constantly 0 or time-out).

Keano wrote:

Hi all,

I am trying to debug a large C++ project with GDB/DDD but I am having great
difficulty at the moment as the debugger hangs (i.e. remains busy
indefinitely, uses 100% of the processor) when I open some source files. It
will also hang when I step through code in other files that will actually
open or if I attempt a backtrace at any time.
If the debugging problem is caused by the application itself, is there a
workaround? Obviously if I can’t open all the source files I can’t debug
them!
I am using Momentics PE 6.2.1A IDE to compile and link.

As always, any help is much appreciated,
Ronan K


PS If anybody is interested I can make the source code and executable
available to reproduce the problem.
The program itself makes heavy use of the STL (if that is relevant) and
compiles and runs without difficulty in Linux and Windows. It runs in QNX
too but returns rubbish values (constantly 0 or time-out).


Sounds like you’re getting bitten by a bug in the debug information

parser where certain C++ programs cause gdb to get stuck spinning. The
PRs referenced are 15264 and 15107 and were fixed in 6.2.1b. I believe
that if you use dwarf-2 debugging format the problem goes away.
Alternatively, you can probably obtain a 6.2.1b gdb from your support
representative.

cheers,

Kris

Thanks for the reply Kris.
How do I implement the dwarf-2 debugging format?
Upgrading to 6.2.1B is not an option as we on the educational programme
which does not offer a support plan and hence we cannot download patches
etc.

Best regards,
RK


“Kris Warkentin” <kewarken@qnx.com> wrote in message
news:c7vtgr$5dd$1@inn.qnx.com

Keano wrote:
Hi all,

I am trying to debug a large C++ project with GDB/DDD but I am having
great
difficulty at the moment as the debugger hangs (i.e. remains busy
indefinitely, uses 100% of the processor) when I open some source files.
It
will also hang when I step through code in other files that will
actually
open or if I attempt a backtrace at any time.
If the debugging problem is caused by the application itself, is there a
workaround? Obviously if I can’t open all the source files I can’t debug
them!
I am using Momentics PE 6.2.1A IDE to compile and link.

As always, any help is much appreciated,
Ronan K


PS If anybody is interested I can make the source code and executable
available to reproduce the problem.
The program itself makes heavy use of the STL (if that is relevant) and
compiles and runs without difficulty in Linux and Windows. It runs in
QNX
too but returns rubbish values (constantly 0 or time-out).


Sounds like you’re getting bitten by a bug in the debug information
parser where certain C++ programs cause gdb to get stuck spinning. The
PRs referenced are 15264 and 15107 and were fixed in 6.2.1b. I believe
that if you use dwarf-2 debugging format the problem goes away.
Alternatively, you can probably obtain a 6.2.1b gdb from your support
representative.

cheers,

Kris

Instead of a regular -g to the compiler (which is, by default,
-gstabs+), use -gdwarf-2. That will do the trick.

cheers,

Kris

Keano wrote:

Thanks for the reply Kris.
How do I implement the dwarf-2 debugging format?
Upgrading to 6.2.1B is not an option as we on the educational programme
which does not offer a support plan and hence we cannot download patches
etc.

Best regards,
RK


“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:c7vtgr$5dd$> 1@inn.qnx.com> …

Keano wrote:

Hi all,

I am trying to debug a large C++ project with GDB/DDD but I am having

great

difficulty at the moment as the debugger hangs (i.e. remains busy
indefinitely, uses 100% of the processor) when I open some source files.

It

will also hang when I step through code in other files that will

actually

open or if I attempt a backtrace at any time.
If the debugging problem is caused by the application itself, is there a
workaround? Obviously if I can’t open all the source files I can’t debug
them!
I am using Momentics PE 6.2.1A IDE to compile and link.

As always, any help is much appreciated,
Ronan K


PS If anybody is interested I can make the source code and executable
available to reproduce the problem.
The program itself makes heavy use of the STL (if that is relevant) and
compiles and runs without difficulty in Linux and Windows. It runs in

QNX

too but returns rubbish values (constantly 0 or time-out).



Sounds like you’re getting bitten by a bug in the debug information
parser where certain C++ programs cause gdb to get stuck spinning. The
PRs referenced are 15264 and 15107 and were fixed in 6.2.1b. I believe
that if you use dwarf-2 debugging format the problem goes away.
Alternatively, you can probably obtain a 6.2.1b gdb from your support
representative.

cheers,

Kris

I’ve compiled with -gdwarf-2 but unfortunately Istill have the same
problems.
Are there other options I could try?



Kris Warkentin wrote:

Instead of a regular -g to the compiler (which is, by default,
-gstabs+), use -gdwarf-2. That will do the trick.

cheers,

Kris

Keano wrote:

Thanks for the reply Kris.
How do I implement the dwarf-2 debugging format?
Upgrading to 6.2.1B is not an option as we on the educational programme
which does not offer a support plan and hence we cannot download patches
etc.

Best regards,
RK


“Kris Warkentin” <> kewarken@qnx.com> > wrote in message
news:c7vtgr$5dd$> 1@inn.qnx.com> …

Keano wrote:

Hi all,

I am trying to debug a large C++ project with GDB/DDD but I am having


great

difficulty at the moment as the debugger hangs (i.e. remains busy
indefinitely, uses 100% of the processor) when I open some source
files.


It

will also hang when I step through code in other files that will


actually

open or if I attempt a backtrace at any time.
If the debugging problem is caused by the application itself, is
there a
workaround? Obviously if I can’t open all the source files I can’t
debug
them!
I am using Momentics PE 6.2.1A IDE to compile and link.

As always, any help is much appreciated,
Ronan K


PS If anybody is interested I can make the source code and executable
available to reproduce the problem.
The program itself makes heavy use of the STL (if that is relevant) and
compiles and runs without difficulty in Linux and Windows. It runs in


QNX

too but returns rubbish values (constantly 0 or time-out).



Sounds like you’re getting bitten by a bug in the debug information
parser where certain C++ programs cause gdb to get stuck spinning. The
PRs referenced are 15264 and 15107 and were fixed in 6.2.1b. I believe
that if you use dwarf-2 debugging format the problem goes away.
Alternatively, you can probably obtain a 6.2.1b gdb from your support
representative.

cheers,

Kris
\