[PATCH] [Windows] Implementing backtracing of self
chisophugis at gmail.com
Wed Mar 4 20:54:44 PST 2015
Random thing I noticed:
_JUMP_BUFFER *JumpBuf = reinterpret_cast<__JUMP_BUFFER *>(Buffer);
The cast type has two underscores, but the variable type has one underscore
(__JUMP_BUFFER and _JUMP_BUFFER respectively). A comment would be nice.
-- Sean Silva
On Wed, Mar 4, 2015 at 4:37 PM, Zachary Turner <zturner at google.com> wrote:
> Hi majnemer, Bigcheese, rnk,
> 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
> This patch implements backtracing of self by using setjmp() to
> get the current values of the instruction pointer, frame pointer,
> and stack pointer, and then calling the same function already
> used by LLVM to print backtraces given the same information.
> The one difference is that with an exception, we have a full
> CONTEXT structure that we can pass to StackWalk64. MSDN documents
> that this is an optional field to StackWalk64, which only provides
> the function the ability to handle more situations. Testing shows
> that even without this function, the results are still good.
> EMAIL PREFERENCES
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits