Overview¶
- First install the
WinDbg
tool. This can be downloaded from
https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/ .
- Then configure
WinDbg
to be the "Just in Time Debugger". To do this, run the following from the command prompt (console; with administrator rights on Windows Vista and higher):
(windbg.exe
is located in whichever directory you just installed it to).
To get a backtrace, in WinDbg
, click View→Call Stack. This will pop up a dialog — make sure that the "Source" and "Source args" are selected. The call stack window has an additional icon in its toolbar that opens a menu: pull down that menu and click its Copy stack to clipboard option; then paste the result into your email to froglogic support.
Caveats¶
Requirement - Binaries compiled with symbols¶
To get line number of source file information with the above approach symbol information must be compiled into the binary files. This is automatically the case for "debug" builds, but for "release" builds the compiler must be told to do so explicitly.
Microsoft compilers¶
To compile the Squish binaries with symbol information you can use one of these patches (but keep in mind that they may be outdated, so feel free to ask our support for recent versions of these patches):
Squish version (branch) | Patch |
---|---|
4.1 | release-with_symbols-41.diff |
4.2 | release-with_symbols-42.diff |
4.3 (the current "unstable" branch) | release-with_symbols-43.diff |
These patches have the following in common:
They are for building release (not debug) type builds.
When applied Squish will try to create minidumps in case of crashes in the Squish tools and the applications that should be automated (to get better backtraces than with default crash handler). (If your application uses its own crash handler, try to disable it to avoid that it disable the Squish crash handler.)
The default crash handler behavior of Squish binary packages can be restored by setting the environment variable SQUISH_USE_STANDARD_CRASHHANDLER to 1 (for example "set SQUISH_USE_STANDARD_CRASHHANDLER=1").
⚠️ If you would rather get such a Squish release build with symbols from froglogic please contact froglogic support and provide the file <SQUISH_DIR>/buildinfo.txt
.
Other compilers¶
Currently we not have more detailed instructions for other compilers (MinGW, GCC on Windows).
Requirement - Disabling Squish crash handlers¶
Squish tries to install crash handlers into most processes started by it. These crash handlers must be disabled because otherwise the Windows crash dialog which allows starting the debugger does not show up.
To disable the Squish crash handlers set the environment variables SQUISH_NO_CRASHHANDLER
and SQUISH_DISABLE_DUMPFILES
to value "1" and start Squish. For example, in cmd.exe
enter the following:
Unreliable or lack of source file or line number information¶
Unfortunately retrieving backtraces from Windows is highly unreliable. Expect 50% or more of all backtraces to not contain any useful information.