Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Windows] Implement PrintStackTrace(FILE*)
llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace of the current thread given the current PC. This function was unimplemented on Windows, and instead the only time we could print a backtrace was as the result of an exception through LLVMUnhandledExceptionFilter. This patch implements backtracing of self by using RtlCaptureContext to get a CONTEXT for the current thread, and moving the printing and StackWalk64 code to a common method that printing own stack trace and printing stack trace of an exception can use. Differential Revision: http://reviews.llvm.org/D8068 Reviewed by: Reid Kleckner llvm-svn: 231382
- Loading branch information
Zachary Turner
committed
Mar 5, 2015
1 parent
e4b9213
commit 62b7b61
Showing
1 changed file
with
104 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters