[swift-users] libswiftCore.dylib was compiled with optimization - stepping may behave oddly;

David Liu david.yang.liu at gmail.com
Sat Aug 27 16:12:04 CDT 2016


Hi Dimitri,

So i have built using ./utils/build-script -R --debug-swift-stdlib 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.
Thanks again for your help.

Cheers

Dave


davids-Mac-Pro:swift dyl$
/Users/dyl/Documents/Apple/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/bin/swift

***  You are running Swift's integrated REPL,  ***

***  intended for compiler and stdlib          ***

***  development and testing purposes only.    ***

***  The full REPL is built as part of LLDB.   ***

***  Type ':help' for assistance.              ***

(swift) :LLDB

Unknown interpreter escape; try :help

(swift) :help

Available commands:

  :quit - quit the interpreter (you can also use :exit or Control+D or
exit(0))

  :autoindent (on|off) - turn on/off automatic indentation of bracketed
lines

  :constraints debug (on|off) - turn on/off the debug output for the
constraint-based type checker

  :dump_ir - dump the LLVM IR generated by the REPL

  :dump_ast - dump the AST representation of the REPL input

  :dump_decl <name> - dump the AST representation of the named declarations

  :dump_source - dump the user input (ignoring lines with errors)

  :print_decl <name> - print the AST representation of the named
declarations

  :print_module <name> - print the decls in the given module, but not
submodules

API documentation etc. will be here eventually.

(swift) func OME(){

          let testData = "some string"

          print(testData)

        }

(swift) :b 1 << this does not work

(swift) breakpoint set --file Range.swift --line 1435 << don't work neither
since not lldb



On Sat, Aug 27, 2016 at 12:26 PM, David Liu <david.yang.liu at gmail.com>
wrote:

> Hi Dimitri
>
> Thanks for the tip really appreciate the help.
>
> Dave
>
>
> On Fri, Aug 26, 2016 at 12:50 PM, Dmitri Gribenko <gribozavr at gmail.com>
> wrote:
>
>> On Fri, Aug 26, 2016 at 10:14 PM, David Liu via swift-users
>> <swift-users at swift.org> wrote:
>> > Thank you Michael this really helps a lot, i really appreciate your
>> help.
>> > Here is the bug i filed. https://bugs.swift.org/browse/SR-2494 .
>> > Also as a side question, this is my current method of trying to debug
>> the
>> > Standard Library,  was wondering is there a better way to debug other
>> than
>> > build toolchain and debug through command line?
>>
>> If you don't need the whole toolchain, just run:
>>
>> ./utils/build-script -R --debug-swift-stdlib
>>
>> This will build the compiler, the standard library, and SDK overlays.
>>
>> Dmitri
>>
>> --
>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160827/38336de6/attachment.html>


More information about the swift-users mailing list