Results 1 to 9 of 9

Thread: Back tracing asserts with gdb

  1. #1
    ucomesdag Guest

    Default Back tracing asserts with gdb

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Back tracing asserts with gdb

    Try setting a breakpoint on qt_assert_x() function.

  3. #3
    ucomesdag Guest

    Default Re: Back tracing asserts with gdb

    It says breakpoint pending ? And does nothing...
    Last edited by ucomesdag; 30th July 2007 at 01:15.

  4. #4
    ucomesdag Guest

    Default Re: Back tracing asserts with gdb

    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.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Back tracing asserts with gdb

    If qt_assert_x() doesn't work, then try setting a breakpoint on qt_assert().

  6. The following user says thank you to jacek for this useful post:


  7. #6
    ucomesdag Guest

    Default Re: Back tracing asserts with gdb

    Quote Originally Posted by jacek View Post
    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"
    Last edited by ucomesdag; 30th July 2007 at 21:31.

  8. #7
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Back tracing asserts with gdb

    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

  9. #8
    ucomesdag Guest

    Default Re: Back tracing asserts with gdb

    Ok is working now... forgot the () and all of a sudden it worked, "break qt_assert_x"

  10. #9
    ucomesdag Guest

    Default Re: Back tracing asserts with gdb

    Quote Originally Posted by marcel View Post
    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

Similar Threads

  1. Problem with SqLite and Qt
    By ad5xj in forum Newbie
    Replies: 26
    Last Post: 5th June 2007, 01:53
  2. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.