Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get callstack .
Forum Updated to NodeBB v4.3 + New Features

How to get callstack .

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zerg2011
    wrote on last edited by
    #1

    Hi
    Anyone knows how to get callstack in QT application in the manner of GDB backtrace ?

    Use model :

    code :
    @int main {
    f1() ;
    }

    int f1 () {
    f2();
    }

    int f2 () {
    printStack() ;
    }
    @

    output :
    main
    f1
    f2

    Thanks.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      I don't think there's a way of doing this with the public API of Qt, so you have to fall back to platform-specific code like <code>backtrace()</code> on glibc and <code>CaptureStackBackTrace()</code> / <code>StackWalk64()</code>on msvc.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved