PDA

View Full Version : Back tracing asserts with gdb



ucomesdag
30th July 2007, 00:23
Hi All,

Having some trouble back tracing: ASSERT failure in ... "index out of range"...
Gdb keeps keeps telling me "No stack".

I tried setting ulimit to unlimited but no avail.

jacek
30th July 2007, 00:39
Try setting a breakpoint on qt_assert_x() function.

ucomesdag
30th July 2007, 01:06
It says breakpoint pending ? And does nothing...

ucomesdag
30th July 2007, 14:26
Can someone please guide me on how to set a break or at least make it posible to back trace on an assertion.
When I set a break it just asks "Make breakpoint pending on future shared library load" and it stays pending... I must be doing something wrong.

jacek
30th July 2007, 20:37
If qt_assert_x() doesn't work, then try setting a breakpoint on qt_assert().

ucomesdag
30th July 2007, 21:21
If qt_assert_x() doesn't work, then try setting a breakpoint on qt_assert().
Does the same...
"Function not defined" and
"Make breakpoint pending on future shared library load"

marcel
30th July 2007, 21:34
Breakpoint pending means that the execution never reaches that function.
The funny thing is that Q_ASSERT and Q_ASSERT_X are macros.
But they call qFatal in these situations.

So, what happens if you put a breakpoint in qFatal?

otherwise:
Can you assume what is the portion of your code that causes the assert?
The you could isolate it, add breakpoints to the suspicious statements and see which one asserts.

Regards

ucomesdag
30th July 2007, 21:42
Ok is working now... forgot the () and all of a sudden it worked, "break qt_assert_x"

ucomesdag
30th July 2007, 21:59
otherwise:
Can you assume what is the portion of your code that causes the assert?
The you could isolate it, add breakpoints to the suspicious statements and see which one asserts.

Tried that but gave up after hitting the break point over 50 times :)