<div dir="ltr">Hi Dimitri,<div><br></div><div>So i have built using <span style="font-size:13px">./utils/build-script -R --debug-swift-stdlib </span>how ever the REPL no longer has line numbers and i can not set a breakpoint via `:b` and am unable to get to lldb to set breakpoints.</div><div>Thanks again for your help.</div><div><br></div><div>Cheers</div><div><br></div><div>Dave</div><div><p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""><br></span></p><p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">davids-Mac-Pro:swift dyl$ /Users/dyl/Documents/Apple/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/bin/swift</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">*** You are running Swift's integrated REPL, ***</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">*** intended for compiler and stdlib ***</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">*** development and testing purposes only. ***</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">*** The full REPL is built as part of LLDB. ***</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">*** Type ':help' for assistance. ***</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">(swift) :LLDB</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">Unknown interpreter escape; try :help</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">(swift) :help</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">Available commands:</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :quit - quit the interpreter (you can also use :exit or Control+D or exit(0))</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :autoindent (on|off) - turn on/off automatic indentation of bracketed lines</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :constraints debug (on|off) - turn on/off the debug output for the constraint-based type checker</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :dump_ir - dump the LLVM IR generated by the REPL</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :dump_ast - dump the AST representation of the REPL input</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :dump_decl <name> - dump the AST representation of the named declarations</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :dump_source - dump the user input (ignoring lines with errors)</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :print_decl <name> - print the AST representation of the named declarations</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> :print_module <name> - print the decls in the given module, but not submodules</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">API documentation etc. will be here eventually.</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">(swift) func OME(){</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> let testData = "some string"</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> print(testData)</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style=""> }</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">(swift) :b 1 << this does not work</span></p>
<p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><span style="">(swift) breakpoint set --file Range.swift --line 1435 << don't work neither since not lldb </span></p><p style="margin:0px;font-size:12px;line-height:normal;font-family:'Andale Mono'"><br></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 27, 2016 at 12:26 PM, David Liu <span dir="ltr"><<a href="mailto:david.yang.liu@gmail.com" target="_blank">david.yang.liu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Dimitri<div><br></div><div>Thanks for the tip really appreciate the help.</div><div><br></div><div>Dave</div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 26, 2016 at 12:50 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, Aug 26, 2016 at 10:14 PM, David Liu via swift-users<br>
<<a href="mailto:swift-users@swift.org" target="_blank">swift-users@swift.org</a>> wrote:<br>
> Thank you Michael this really helps a lot, i really appreciate your help.<br>
> Here is the bug i filed. <a href="https://bugs.swift.org/browse/SR-2494" rel="noreferrer" target="_blank">https://bugs.swift.org/browse/<wbr>SR-2494</a> .<br>
> Also as a side question, this is my current method of trying to debug the<br>
> Standard Library, was wondering is there a better way to debug other than<br>
> build toolchain and debug through command line?<br>
<br>
</span>If you don't need the whole toolchain, just run:<br>
<br>
./utils/build-script -R --debug-swift-stdlib<br>
<br>
This will build the compiler, the standard library, and SDK overlays.<br>
<span><font color="#888888"><br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=<wbr>2;j<i;j++){if(!(i%j)){j=0;brea<wbr>k;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>>*/<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>