GDB hangs

SUSE 11.2 / KDE
when I am using GDB it sometimes taking 100% of CPU and stopping respond. Usually it happens when I am trying to inspect some variable. It looks like GDB have problem with finding some symbols in STL constructions.
I tried different frontends (Borland CBX, NetBeans, DDD, KDbg) but it looks like the problem is in GDB itself.

I am also having this problem on all my machines. It makes development a real pain and I am forced to write code on my Mac. I would rank this a critical issue.

Is there no one looking into this?

Could you supply some code that causes GDB to hang and I’ll have a look.

There was another thread on GDB craching, see here: Suse 11.1 default gdb 6.8.50.20081120 backtrace crashes - openSUSE Forums. This was for 11.1, but it could still be the same problem.

Confirming this problem. Gdb spins/hangs at 100% cpu when searching for symbols.

Steps to reproduce

  1. Run gdb interactively
  2. While at a break point >1 frame deep enter the command:
    (gdb) up
    to select the frame 1 ‘up’ from the current frame
  3. enter the command
    (gdb) print foo
    Observe that gdb no longer responds

kernel: Linux linux 2.6.31.8-0.1-desktop #1 SMP PREEMPT 2009-12-15 23:55:40 +0100 x86_64 x86_64 x86_64 GNU/Linux
gdb package: gdb-6.8.91.20090930-2.4.x86_64

I can confirm gdb has be hanging consistently for a while now, especially when attempting tab completion.

This is a top priority issue AFAIC, it makes developement unbearable. Has a bug already been reported? I’d like to at least vote on it, and maybe provide some input as well.

Could this be related? https://bugzilla.redhat.com/show_bug.cgi?id=541093

Upgrading to GDB 7.1 fixed this for me.