Inspecting STL containers with GDB pretty print [message #1230331] |
Sat, 11 January 2014 17:47 |
Jan Pohanka Messages: 29 Registered: June 2011 |
Junior Member |
|
|
Hi all,
I'm trying to setup Eclipse to work with GDB stl pretty print. I have followed basic instructions, checkouted latest version of python prettyprinters from GNU website and inserted needed settings into .gdbinit.
Pretty printer works perfectly in standalone gdb. However when I try to debug the same simple testing application in Eclipse, it works only sometimes. The debugging fails very often with following output on the gdb console.
The target endianness is set automatically (currently little endian)
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
/home/zumbi/gdb-7.6.1/gdb/varobj.c:3532: internal-error: c_value_of_variable: Assertion `!value_lazy (var->value)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
/home/zumbi/gdb-7.6.1/gdb/varobj.c:3532: internal-error: c_value_of_variable: Assertion `!value_lazy (var->value)' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Does anyone have similar problem and know a solution?
Described situation is happening on Debian Jessie x64, GCC 4.8, GDB 7.6, Eclipse Kepler
BR
Jan
[Updated on: Sun, 12 January 2014 08:26] Report message to a moderator
|
|
|
|
|
Re: Inspecting STL containers with GDB pretty print [message #1231376 is a reply to message #1230986] |
Tue, 14 January 2014 14:11 |
Jan Pohanka Messages: 29 Registered: June 2011 |
Junior Member |
|
|
Marc Khouzam wrote on Mon, 13 January 2014 09:32
Can you give the steps to reproduce the crash?
Hi Marc,
surprisingly today it was not easy to me to reproduce the bug again. At last I have discovered that using following code
#include <list>
using namespace std;
struct Foo {
int x;
int y;
};
int main()
{
list<int> x;
list<int> y;
list<Foo> z;
x.push_back(1);
x.push_back(2);
y.push_back(1);
y.push_back(1);
z.push_back(Foo{1,0});
z.push_back(Foo{1,0});
return 0;
}
these steps lead to GDB crash in more that 50% of tries.
Variables or Expressions view has to be visible.
1. Set the breakpoint to the line with return
2. Start debug session
3. Run the application
4. GDB fails with returning -1, traces are attached as traces_log1
or
1. Start debug session
2. Step through the program
3. GDB hangs when accessing second or third line of the main(), traces are attached as traces_log2
I will try to reproduce it with GDB itself later this week.
thanks
Jan
-
Attachment: traces_log1
(Size: 21.61KB, Downloaded 289 times) -
Attachment: traces_log2
(Size: 23.80KB, Downloaded 299 times)
[Updated on: Tue, 14 January 2014 14:11] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05132 seconds