No callstack on failed assert().

Sysprogs forums Forums VisualGDB No callstack on failed assert().

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #29471
    andrew
    Participant

    I’m having trouble obtaining a useable call-stack from the debugger when my program crashes.  When the crash occurs, the debugger breaks but instead of showing me the line which caused the crash, it shows a “Frame not in window” message. The call-stack is just a couple raw addresses. Here is a minimal reproduction of the issue.

    #include <cassert>
    #include <iostream>

    int main() {
      assert(false); // crashes here
      std::cout << "hello world" << std::endl;
      return 0;
    }

    How can I get the debugger to correctly tell me which line is triggering the crash? I’m using VisualGDB 5.3R to cross compile and deploy the project to a BeagleBoneBlack running Debian 9.5.

    #29472
    andrew
    Participant

    In the example above, assert() does infact print the file-name and line-number to stdout before crashing, but the error message printed from the original program is not giving me a file or line number:

    terminate called after throwing an instance of 'std::out_of_range'
    what(): basic_string::at: __n (which is 5) >= this->size() (which is 2)

    #29473
    support
    Keymaster

    Hi,

    Please try updating to the latest VisualGDB 5.5 (you may need to renew your key here). If the problem persists, please collect and attach a gdb log file as shown here and we will investigate this further.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.