bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gdb enters an infinite loop when trying to display the contents o f a va


From: Benoit Germain
Subject: gdb enters an infinite loop when trying to display the contents o f a variable (sample code attached)
Date: Thu, 18 Oct 2001 15:34:17 +0200

Hello,

What I want to do is this:

I have a virtual public class C that is my interface to a library I want to
provide to clients. The client cannot instanciate it, but can get pointers
to instances through a public function.
Both the class type and the function are declared in a certain namespace (nA
in the sample code).

Hidden in the private area, and contained in a namespace nB, is another
class C (same name, but different namespace) that inherits from nA :: C .
Instances of nB :: C are stored in a global array.

To reproduce the bug, simply:

tar xfz breakgdb.tgz
cd breakgdb
gcc -g -O0 *.cpp
gdb a.out
break 7
run
print * c

At this point, gdb is unable to display the contents of the object pointed
by c, and will enter an infinite loop that will considerably slow down the
system. This occurs with and without the -O0 option. Ctrl-C takes some time
to complete.

The box is a dual PIII-933 with 512Mb RAM running Linux Mandrake 8.1 (gdb
abd gcc come from the distribution and have not been upgraded).
gdb version is GNU gdb 20010813 (MI_OUT)
gcc version is 2.96


 <<breakgdb.tgz>> 

Good luck :-)

Attachment: breakgdb.tgz
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]