<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 12:11 PM, Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Sep 7, 2017, at 12:01 PM, Zachary Turner <<a href="mailto:zturner@google.com" class="">zturner@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Sep 7, 2017 at 11:49 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div class="" style="word-wrap: break-word;"><div class=""><blockquote type="cite" class=""><div class="">On Sep 7, 2017, at 11:37 AM, Zachary Turner via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_1050070664503181110Apple-interchange-newline"><div class=""><div dir="ltr" class="">To be clear, the tests I'm proposing will have no resemblance whatsoever to GDB, so I would be intentionally forking the set of tests in this regards.  So there would very clearly be a paradigm shift in writing CodeView debug info tests (which would be written in JavaScript using WinDbg specific debugger commands) and DWARF debug info tests (which would be written in whatever / using GDB style commands)</div></div></blockquote><div class=""><br class=""></div></div></div><div class="" style="word-wrap: break-word;"><div class=""><div class="">That sounds like an unfortunate direction. Can you explain why it wouldn't be possible to write a wrapper (in JavaScript) that interprets the 3ish gdb commands used by the tests in terms of WinDbg? Similar to how LLDB is supported?</div><div class=""><br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">I can think of a couple of reasons:</div><div class=""><br class=""></div><div class="">1) We're already going to need entirely different runlines.  clang and clang-cl don't use the same command line options, or for that matter even styles.</div></div></div></div></blockquote><div class=""><br class=""></div>I'm not familiar with clang-cl so please bear with me if this is a stupid question: Is clang-cl just an MSVC compatible driver? Can you not produce the same result by using the "standard" clang driver and a windows target triple?</div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class="">2) The output format is going to be different.  whereas the current tests look for things like </div></div></div></div></blockquote><div class=""><br class=""></div>If you are going to write a wrapper script for the debugger commands, that wrapper script could also transform the output to look more like the GDB output that the CHECK-lines are looking for.<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class=""></div><div class=""><div class="">// CHECK: ${{[0-9]+}} =</div><div class="">// CHECK:  Data ={{.*}} 0x0{{(0*)}}</div><div class="">// CHECK:  Kind = 2142</div></div><div class=""><br class=""></div><div class="">In WinDbg this is going to be more like:</div><div class=""><br class=""></div><div class=""><span class="" style="color: rgb(30, 30, 30);">Local var @ 0x6ffa50 Type SVal</span><br class=""></div><div class=""><pre class=""><span class="" style="color: rgb(30, 30, 30);">   +0x000 </span><span class="" style="color: rgb(30, 30, 30);">Data             : (null) </span>
<span class="" style="color: rgb(30, 30, 30);">   +0x004 </span><span class="" style="color: rgb(30, 30, 30);">Kind             : 0x85e</span></pre><pre class=""><br class=""></pre></div></div></div></div></blockquote></div></div></blockquote><div><br class=""></div>Alternatively, this is still similar enough that we could relax the check to look like</div><div>  CHECK: Data{{.*[:=].*(0x0|.null.)}}</div><div>  CHECK: Kind{{.*[:=].*(2142|0x85e)}}</div><div>without much loss.</div><div><br class=""></div><div>-- adrian</div><div><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><pre class=""><span class="" style="font-family: sans-serif; white-space: normal;">So we're also going to need different check lines.</span></pre><pre class=""><font face="sans-serif" class=""><span class="" style="white-space: normal;">At this point, the only similarities in the PDB / DWARF tests is going to be the source code, as I don't see an easy way to automatically translate command lines, input commands, and output text.</span></font></pre></div></div></div></div></blockquote></div><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">By the way, I'm fine with adding, e.g., a PDB subdirectory with a lit filter that contains tests that will only work under Windows, but it would be very unfortunate if there was no common set of tests, since then the Windows folks wouldn't benefit from new tests being added for GDB and vice versa.</span><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">-- adrian</div></div></blockquote></div><br class=""></body></html>