<div dir="ltr">Thanks for noticing that.  the actual type is declared typedef struct <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">__JUMP_BUFFER { ... } _JUMP_BUFFER.  So I will just stick with the single underscore version in both places.</span><br></div><br><div class="gmail_quote">On Wed, Mar 4, 2015 at 8:54 PM Sean Silva <<a href="mailto:chisophugis@gmail.com">chisophugis@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Random thing I noticed:<br><br> _JUMP_BUFFER *JumpBuf = reinterpret_cast<__JUMP_BUFFER *>(Buffer);<br><br></div>The cast type has two underscores, but the variable type has one underscore (__JUMP_BUFFER and _JUMP_BUFFER respectively). A comment would be nice.<br><br></div>-- Sean Silva<br></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 4, 2015 at 4:37 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi majnemer, Bigcheese, rnk,<br>
<br>
    llvm::sys::PrintBacktrace(FILE*) is supposed to print a backtrace<br>
    of the current thread given the current PC.  This function was<br>
    unimplemented on Windows, and instead the only time we could<br>
    print a backtrace was as the result of an exception through<br>
    LLVMUnhandledExceptionFilter.<br>
<br>
    This patch implements backtracing of self by using setjmp() to<br>
    get the current values of the instruction pointer, frame pointer,<br>
    and stack pointer, and then calling the same function already<br>
    used by LLVM to print backtraces given the same information.<br>
<br>
    The one difference is that with an exception, we have a full<br>
    CONTEXT structure that we can pass to StackWalk64.  MSDN documents<br>
    that this is an optional field to StackWalk64, which only provides<br>
    the function the ability to handle more situations.  Testing shows<br>
    that even without this function, the results are still good.<br>
<br>
<a href="http://reviews.llvm.org/D8068" target="_blank">http://reviews.llvm.org/D8068</a><br>
<br>
Files:<br>
  lib/Support/Windows/Signals.inc<br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div>