|gdb problem when debugging std::shared_ptr [message #1059202]
||Fri, 17 May 2013 09:28
| Paolo Laffranchini
Registered: May 2013
It is actually the first time i post on this forum, so i will try to explain my issues the best way i can...
i'm having a problem when debugging a multithreaded application...
Basically, the program crashes because of a segmentation fault, so i was trying to debug it using eclipse 3.8 CDT on Ubuntu 12.10
My app uses std::shared:ptr<T> and yesterday, during debugging, i found out that the problem came up when trying to access the object stored in the shared_ptr, but the raw pointer had value "0x0" (obviously causing the segfault).
So, today, i tried to put around my code some conditional breakpoints with condition of the form:
obj.get()==0x0 (obj is a shared_ptr instance)
what is actually happening during the debugging is that the program crashes with the following error (from the gdb trace):
Error in testing breakpoint condition:
The program stopped in another thread while making a function call from GDB.
Evaluation of the expression containing the function
(std::__shared_ptr<Packet, (__gnu_cxx::_Lock_policy)2>::get() const) will be abandoned.
When the function is done executing, GDB will silently stop.
/build/buildd/gdb-7.5/gdb/infrun.c:6076: internal-error: normal_stop: Assertion `get_frame_type (frame) == DUMMY_FRAME' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
I really do not understand what is happening here, since the problem does not show up if i disable the breakpoints (still the program crashes due to the segfault, obviously).
Any help will be extremly appreciated...Thank you in advance...
Powered by FUDForum
. Page generated in 0.19943 seconds