boostorg / stacktrace

C++ library for storing and printing backtraces.
https://boost.org/libs/stacktrace
424 stars 71 forks source link

Incomple stacktrace with WinDbg #45

Closed githubuser0xFFFF closed 5 years ago

githubuser0xFFFF commented 6 years ago

I use BOOST_BACKTRACE_USE_WINDBG here for printing stacktraces in my MinGW compiled application. If I print the stacktrace in the debug version of my application, I will get a complete stacktrace. If I print the stacktrace in the release version (-fno-omit-frame-pointer and debug symbols not stripped), some levels are missing.

This is the stack of the release version that is shown in the QtCreator debugger:

This is the stack trace that is printed by boost stacktrace for the release version:

This is the stack trace that is printed by boost stacktrace for the debug version:

So the QtCreator debugger can extract a more detailed stacktrace from the release build than the boost stacktrace library. Is this normal or is this an issue?

apolukhin commented 5 years ago

Yes, this seems to be OK. Looks like the debugger in QtCreator has some logic to add the missing levels.

It executes the binary, so it has more control over the binary and less restrictions than the "stack trace from itself" approach.