Cannot use swift REPL from stand alone lldb build

Hi!

I run lldb, platform select ios-simulator, connect to the right simulator
and attach to my app and when trying to try to do anything in the repl I
get the following kind of error at the bottom for an Abort, please help!
The repl works fine in Xcode, not sure why it wouldn't work in this case.

(lldb) process attach -n <App Name> --waitfor

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP

    frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10

dyld`pread:

-> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>

    0x7fff6d4ca5e4 <+12>: movq %rax, %rdi

    0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror

    0x7fff6d4ca5ec <+20>: retq

Executable module set to
"/Users/Rex/Library/Developer/CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App

.app/<App Name>".

Architecture set to: x86_64h-apple-ios.

(lldb) continue

Process 27857 resuming

(lldb) process interrupt

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP

    frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10

libsystem_kernel.dylib`mach_msg_trap:

-> 0x115929f72 <+10>: retq

    0x115929f73 <+11>: nop

libsystem_kernel.dylib`mach_msg_overwrite_trap:

    0x115929f74 <+0>: movq %rcx, %r10

    0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020

(lldb) repl

  1> import Foundation

warning: Swift error in module <App Name>.

Debug info from this module will be unavailable in the debugger.

Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths,
file
/Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp,
line 3587.

Abort trap: 6

···

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

Hi Rex,

Hi!

I run lldb, platform select ios-simulator, connect to the right simulator
and attach to my app and when trying to try to do anything in the repl I
get the following kind of error at the bottom for an Abort, please help!
The repl works fine in Xcode, not sure why it wouldn't work in this case.

(lldb) process attach -n <App Name> --waitfor

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP

    frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10

dyld`pread:

-> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>

    0x7fff6d4ca5e4 <+12>: movq %rax, %rdi

    0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror

    0x7fff6d4ca5ec <+20>: retq

Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-
6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-
DB79-4A4A-8ADE-0E616CAB0093/<App Name>.app/<App Name>".

Architecture set to: x86_64h-apple-ios.

(lldb) continue

Process 27857 resuming

(lldb) process interrupt

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP

    frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10

libsystem_kernel.dylib`mach_msg_trap:

-> 0x115929f72 <+10>: retq

    0x115929f73 <+11>: nop

libsystem_kernel.dylib`mach_msg_overwrite_trap:

    0x115929f74 <+0>: movq %rcx, %r10

    0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020

(lldb) repl

  1> import Foundation

warning: Swift error in module <App Name>.

Debug info from this module will be unavailable in the debugger.

This part looks suspicious. I'm assuming <App Name> is really something
else on your end. If you do have a space in the name, you might want to
try without a space as something in the toolchain might be mishandling
spaces in pathnames.

Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths,
file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp,
line 3587.

Abort trap: 6

This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.

There are a couple members of the team that will likely have some thoughts
on what to try. I'll make sure they see this tomorrow.

Thanks for passing that along,
Todd

···

On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < swift-lldb-dev@swift.org> wrote:

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; |
FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
-Todd

Indeed, that's our app name, there are no spaces. Thanks for all the help!

···

On Thursday, October 6, 2016, Todd Fiala <todd.fiala@gmail.com> wrote:

Hi Rex,

On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < > swift-lldb-dev@swift.org > <javascript:_e(%7B%7D,'cvml','swift-lldb-dev@swift.org');>> wrote:

Hi!

I run lldb, platform select ios-simulator, connect to the right simulator
and attach to my app and when trying to try to do anything in the repl I
get the following kind of error at the bottom for an Abort, please help!
The repl works fine in Xcode, not sure why it wouldn't work in this case.

(lldb) process attach -n <App Name> --waitfor

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP

    frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10

dyld`pread:

-> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>

    0x7fff6d4ca5e4 <+12>: movq %rax, %rdi

    0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror

    0x7fff6d4ca5ec <+20>: retq

Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/
data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App
>.app/<App Name>".

Architecture set to: x86_64h-apple-ios.

(lldb) continue

Process 27857 resuming

(lldb) process interrupt

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP

    frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap +
10

libsystem_kernel.dylib`mach_msg_trap:

-> 0x115929f72 <+10>: retq

    0x115929f73 <+11>: nop

libsystem_kernel.dylib`mach_msg_overwrite_trap:

    0x115929f74 <+0>: movq %rcx, %r10

    0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020

(lldb) repl

  1> import Foundation

warning: Swift error in module <App Name>.

Debug info from this module will be unavailable in the debugger.

This part looks suspicious. I'm assuming <App Name> is really something
else on your end. If you do have a space in the name, you might want to
try without a space as something in the toolchain might be mishandling
spaces in pathnames.

Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths,
file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp,
line 3587.

Abort trap: 6

This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.

There are a couple members of the team that will likely have some thoughts
on what to try. I'll make sure they see this tomorrow.

Thanks for passing that along,
Todd

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
<javascript:_e(%7B%7D,'cvml','swift-lldb-dev@swift.org');>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
-Todd

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

This error usually comes from some Swift component in you app not being built with exactly the same Swift compiler as the one that the lldb you are using is built with. For instance, if you are building your own lldb, you have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can get pretty big so it's better to file a bug and attach these logs to the bug. Note, the logs get overwritten every time you start a debug session, so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

···

On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

Hi Rex,

On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:
Hi!

I run lldb, platform select ios-simulator, connect to the right simulator and attach to my app and when trying to try to do anything in the repl I get the following kind of error at the bottom for an Abort, please help! The repl works fine in Xcode, not sure why it wouldn't work in this case.

(lldb) process attach -n <App Name> --waitfor

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop reason = signal SIGSTOP

    frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10

dyld`pread:

-> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>

    0x7fff6d4ca5e4 <+12>: movq %rax, %rdi

    0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror

    0x7fff6d4ca5ec <+20>: retq

Executable module set to "/Users/Rex/Library/Developer/CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App Name>.app/<App Name>".

Architecture set to: x86_64h-apple-ios.

(lldb) continue

Process 27857 resuming

(lldb) process interrupt

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP

    frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10

libsystem_kernel.dylib`mach_msg_trap:

-> 0x115929f72 <+10>: retq

    0x115929f73 <+11>: nop

libsystem_kernel.dylib`mach_msg_overwrite_trap:

    0x115929f74 <+0>: movq %rcx, %r10

    0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020

(lldb) repl

  1> import Foundation

warning: Swift error in module <App Name>.

Debug info from this module will be unavailable in the debugger.

This part looks suspicious. I'm assuming <App Name> is really something else on your end. If you do have a space in the name, you might want to try without a space as something in the toolchain might be mishandling spaces in pathnames.

Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.

Abort trap: 6

This bit above definitely means something is wrong. I suspect it's a cascading error for the debugger not being able to find debug info.

There are a couple members of the team that will likely have some thoughts on what to try. I'll make sure they see this tomorrow.

Thanks for passing that along,
Todd

--
Rex Fenley | IOS DEVELOPER

Remind.com | BLOG | FOLLOW US | LIKE US

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
-Todd
_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Hey Todd! Any news from this investigation on your end? Still haven't
figured out a way around this on my end yet.

···

On Fri, Oct 7, 2016 at 7:54 AM, Rex Fenley <rex@remind101.com> wrote:

Indeed, that's our app name, there are no spaces. Thanks for all the help!

On Thursday, October 6, 2016, Todd Fiala <todd.fiala@gmail.com> wrote:

Hi Rex,

On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < >> swift-lldb-dev@swift.org> wrote:

Hi!

I run lldb, platform select ios-simulator, connect to the right
simulator and attach to my app and when trying to try to do anything in the
repl I get the following kind of error at the bottom for an Abort, please
help! The repl works fine in Xcode, not sure why it wouldn't work in this
case.

(lldb) process attach -n <App Name> --waitfor

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP

    frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10

dyld`pread:

-> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>

    0x7fff6d4ca5e4 <+12>: movq %rax, %rdi

    0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror

    0x7fff6d4ca5ec <+20>: retq

Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/d
ata/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App
>.app/<App Name>".

Architecture set to: x86_64h-apple-ios.

(lldb) continue

Process 27857 resuming

(lldb) process interrupt

Process 27857 stopped

* thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP

    frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap +
10

libsystem_kernel.dylib`mach_msg_trap:

-> 0x115929f72 <+10>: retq

    0x115929f73 <+11>: nop

libsystem_kernel.dylib`mach_msg_overwrite_trap:

    0x115929f74 <+0>: movq %rcx, %r10

    0x115929f77 <+3>: movl $0x1000020, %eax ; imm =
0x1000020

(lldb) repl

  1> import Foundation

warning: Swift error in module <App Name>.

Debug info from this module will be unavailable in the debugger.

This part looks suspicious. I'm assuming <App Name> is really something
else on your end. If you do have a space in the name, you might want to
try without a space as something in the toolchain might be mishandling
spaces in pathnames.

Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths,
file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp,
line 3587.

Abort trap: 6

This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.

There are a couple members of the team that will likely have some
thoughts on what to try. I'll make sure they see this tomorrow.

Thanks for passing that along,
Todd

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
-Todd

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; |
FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo to
build lldb and we are building our app with Xcode 8. Are these not the same
swift versions?

···

On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com> wrote:

This error usually comes from some Swift component in you app not being
built with exactly the same Swift compiler as the one that the lldb you are
using is built with. For instance, if you are building your own lldb, you
have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can
get pretty big so it's better to file a bug and attach these logs to the
bug. Note, the logs get overwritten every time you start a debug session,
so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev < > swift-lldb-dev@swift.org> wrote:
>
> Hi Rex,
>
>
>
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < > swift-lldb-dev@swift.org> wrote:
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right
simulator and attach to my app and when trying to try to do anything in the
repl I get the following kind of error at the bottom for an Abort, please
help! The repl works fine in Xcode, not sure why it wouldn't work in this
case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-
6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-
DB79-4A4A-8ADE-0E616CAB0093/<App Name>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap +
10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really something
else on your end. If you do have a space in the name, you might want to
try without a space as something in the toolchain might be mishandling
spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths,
file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp,
line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some
thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

Hey Jim!

I downloaded the toolchain from the swift website, attached the toolchain
to Xcode 8, rebuilt the app, ran the lldb included in the toolchain, but
then got stuck trying to select the correct platform and simulator

$ /Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/lldb

(lldb) platform select ios-simulator

  Platform: ios-simulator

    Triple: x86_64h-apple-macosx

OS Version: 10.11.6 (15G1004)

    Kernel: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016;
root:xnu-3248.60.11~1/RELEASE_X86_64

  Hostname: 127.0.0.1

WorkingDir: /Users/Rex/Documents/projects/swift-lldb

  SDK Path: error: unable to locate SDK

No devices are available.

···

On Fri, Oct 7, 2016 at 11:30 AM, Rex Fenley <rex@remind101.com> wrote:

We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo to
build lldb and we are building our app with Xcode 8. Are these not the same
swift versions?

On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com> wrote:

This error usually comes from some Swift component in you app not being
built with exactly the same Swift compiler as the one that the lldb you are
using is built with. For instance, if you are building your own lldb, you
have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by
putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can
get pretty big so it's better to file a bug and attach these logs to the
bug. Note, the logs get overwritten every time you start a debug session,
so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev < >> swift-lldb-dev@swift.org> wrote:
>
> Hi Rex,
>
>
>
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < >> swift-lldb-dev@swift.org> wrote:
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right
simulator and attach to my app and when trying to try to do anything in the
repl I get the following kind of error at the bottom for an Abort, please
help! The repl works fine in Xcode, not sure why it wouldn't work in this
case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/
data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App
>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap
+ 10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm =
0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really
something else on your end. If you do have a space in the name, you might
want to try without a space as something in the toolchain might be
mishandling spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function
GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/
swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some
thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; |
FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

Hey Jim! Anything we can do here to have the toolchain lldb find our
simulator?

···

On Fri, Oct 7, 2016 at 11:57 AM, Rex Fenley <rex@remind101.com> wrote:

Hey Jim!

I downloaded the toolchain from the swift website, attached the toolchain
to Xcode 8, rebuilt the app, ran the lldb included in the toolchain, but
then got stuck trying to select the correct platform and simulator

$ /Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/lldb

(lldb) platform select ios-simulator

  Platform: ios-simulator

    Triple: x86_64h-apple-macosx

OS Version: 10.11.6 (15G1004)

    Kernel: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016;
root:xnu-3248.60.11~1/RELEASE_X86_64

  Hostname: 127.0.0.1

WorkingDir: /Users/Rex/Documents/projects/swift-lldb

  SDK Path: error: unable to locate SDK

No devices are available.

On Fri, Oct 7, 2016 at 11:30 AM, Rex Fenley <rex@remind101.com> wrote:

We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo
to build lldb and we are building our app with Xcode 8. Are these not the
same swift versions?

On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com> wrote:

This error usually comes from some Swift component in you app not being
built with exactly the same Swift compiler as the one that the lldb you are
using is built with. For instance, if you are building your own lldb, you
have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by
putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can
get pretty big so it's better to file a bug and attach these logs to the
bug. Note, the logs get overwritten every time you start a debug session,
so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev < >>> swift-lldb-dev@swift.org> wrote:
>
> Hi Rex,
>
>
>
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < >>> swift-lldb-dev@swift.org> wrote:
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right
simulator and attach to my app and when trying to try to do anything in the
repl I get the following kind of error at the bottom for an Abort, please
help! The repl works fine in Xcode, not sure why it wouldn't work in this
case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/d
ata/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App
>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap
+ 10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm =
0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really
something else on your end. If you do have a space in the name, you might
want to try without a space as something in the toolchain might be
mishandling spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function
GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/
swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some
thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; |
FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

While I haven't done any diagnosing on your actual issue, I believe that this is a known issue, and the requisite fix is already available - even if only not the llvm.org <http://llvm.org/&gt; side, as:

···

------------------------------------------------------------------------
r278166 | enrico | 2016-08-09 14:16:58 -0700 (Tue, 09 Aug 2016) | 5 lines

Adjust LLDB's iOS simulator interface for changes in CoreSimulator

rdar://27732333 and rdar://27732377

If applying that patch doesn't help, let me know

On Oct 7, 2016, at 11:57 AM, Rex Fenley via swift-lldb-dev <swift-lldb-dev@swift.org> wrote:

Hey Jim!

I downloaded the toolchain from the swift website, attached the toolchain to Xcode 8, rebuilt the app, ran the lldb included in the toolchain, but then got stuck trying to select the correct platform and simulator

$ /Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/lldb

(lldb) platform select ios-simulator

  Platform: ios-simulator

    Triple: x86_64h-apple-macosx

OS Version: 10.11.6 (15G1004)

    Kernel: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64

  Hostname: 127.0.0.1

WorkingDir: /Users/Rex/Documents/projects/swift-lldb

  SDK Path: error: unable to locate SDK

No devices are available.

On Fri, Oct 7, 2016 at 11:30 AM, Rex Fenley <rex@remind101.com <mailto:rex@remind101.com>> wrote:
We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo to build lldb and we are building our app with Xcode 8. Are these not the same swift versions?

On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com <mailto:jingham@apple.com>> wrote:
This error usually comes from some Swift component in you app not being built with exactly the same Swift compiler as the one that the lldb you are using is built with. For instance, if you are building your own lldb, you have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can get pretty big so it's better to file a bug and attach these logs to the bug. Note, the logs get overwritten every time you start a debug session, so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:
>
> Hi Rex,
>
>
>
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right simulator and attach to my app and when trying to try to do anything in the repl I get the following kind of error at the bottom for an Abort, please help! The repl works fine in Xcode, not sure why it wouldn't work in this case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App Name>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really something else on your end. If you do have a space in the name, you might want to try without a space as something in the toolchain might be mishandling spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; | FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US <Facebook;

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; | FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US <Facebook
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Thanks,
- Enrico
:envelope_with_arrow: egranata@.com :phone: 27683

Thanks Enrico! Is there a download at swift.org that has the patch
available or do I have to manually apply it to the source? And what about "SDK
Path: error: unable to locate SDK No devices are available." errors when I
simply try to run the lldb from the toolchain downloaded from swift.org? I
followed all the directions in Swift.org - Download Swift

Also, if I have to do this from source vs download, I tried to instead
build the toolchain from source and I was guessing that
swift/utils/build-toolchain would do it but it seems to fail with

Couldn't find llbuild source directory.

./utils/build-script: fatal error: command terminated with a non-zero exit
status 1, aborting

almost immediately... Am I going down the right path?

Thanks!

···

On Fri, Oct 7, 2016 at 1:47 PM, Enrico Granata <egranata@apple.com> wrote:

While I haven't done any diagnosing on your actual issue, I believe that
this is a known issue, and the requisite fix is already available - even if
only not the llvm.org side, as:

------------------------------------------------------------------------
r278166 | enrico | 2016-08-09 14:16:58 -0700 (Tue, 09 Aug 2016) | 5 lines

Adjust LLDB's iOS simulator interface for changes in CoreSimulator

rdar://27732333 and rdar://27732377

If applying that patch doesn't help, let me know

On Oct 7, 2016, at 11:57 AM, Rex Fenley via swift-lldb-dev < > swift-lldb-dev@swift.org> wrote:

Hey Jim!

I downloaded the toolchain from the swift website, attached the toolchain
to Xcode 8, rebuilt the app, ran the lldb included in the toolchain, but
then got stuck trying to select the correct platform and simulator

$ /Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/lldb

(lldb) platform select ios-simulator

  Platform: ios-simulator

    Triple: x86_64h-apple-macosx

OS Version: 10.11.6 (15G1004)

    Kernel: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016;
root:xnu-3248.60.11~1/RELEASE_X86_64

  Hostname: 127.0.0.1

WorkingDir: /Users/Rex/Documents/projects/swift-lldb

  SDK Path: error: unable to locate SDK

No devices are available.

On Fri, Oct 7, 2016 at 11:30 AM, Rex Fenley <rex@remind101.com> wrote:

We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo
to build lldb and we are building our app with Xcode 8. Are these not the
same swift versions?

On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com> wrote:

This error usually comes from some Swift component in you app not being
built with exactly the same Swift compiler as the one that the lldb you are
using is built with. For instance, if you are building your own lldb, you
have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by
putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can
get pretty big so it's better to file a bug and attach these logs to the
bug. Note, the logs get overwritten every time you start a debug session,
so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev < >>> swift-lldb-dev@swift.org> wrote:
>
> Hi Rex,
>
>
>
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev < >>> swift-lldb-dev@swift.org> wrote:
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right
simulator and attach to my app and when trying to try to do anything in the
repl I get the following kind of error at the bottom for an Abort, please
help! The repl works fine in Xcode, not sure why it wouldn't work in this
case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop
reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/
CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/d
ata/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App
>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72
libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap
+ 10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm =
0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really
something else on your end. If you do have a space in the name, you might
want to try without a space as something in the toolchain might be
mishandling spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function
GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/
swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a
cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some
thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; |
FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;
_______________________________________________
swift-lldb-dev mailing list
swift-lldb-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Thanks,
*- Enrico*
:envelope_with_arrow: egranata@.com :phone: 27683

--

Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt;
> FOLLOW
US <https://twitter.com/remindhq&gt; | LIKE US
<Facebook;

Thanks Enrico! Is there a download at swift.org <http://swift.org/&gt; that has the patch available or do I have to manually apply it to the source?

I believe you're going to have to manually apply the patch

And what about "SDK Path: error: unable to locate SDK No devices are available." errors when I simply try to run the lldb from the toolchain downloaded from swift.org <http://swift.org/&gt;? I followed all the directions in Swift.org - Download Swift

The patch is intended to fix that

Also, if I have to do this from source vs download, I tried to instead build the toolchain from source and I was guessing that swift/utils/build-toolchain would do it but it seems to fail with
Couldn't find llbuild source directory.

./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

almost immediately... Am I going down the right path?

At a glance, it looks like your build commands include "please build LLBuild", but then you didn't check it out
One of two solutions: don't ask build-script to build it, or check it out

Thanks!

While I haven't done any diagnosing on your actual issue, I believe that this is a known issue, and the requisite fix is already available - even if only not the llvm.org <http://llvm.org/&gt; side, as:

------------------------------------------------------------------------
r278166 | enrico | 2016-08-09 14:16:58 -0700 (Tue, 09 Aug 2016) | 5 lines

Adjust LLDB's iOS simulator interface for changes in CoreSimulator

rdar://27732333 <> and rdar://27732377 <>

If applying that patch doesn't help, let me know

Hey Jim!

I downloaded the toolchain from the swift website, attached the toolchain to Xcode 8, rebuilt the app, ran the lldb included in the toolchain, but then got stuck trying to select the correct platform and simulator

$ /Library/Developer/Toolchains/swift-3.0-RELEASE.xctoolchain/usr/bin/lldb

(lldb) platform select ios-simulator

  Platform: ios-simulator

    Triple: x86_64h-apple-macosx

OS Version: 10.11.6 (15G1004)

    Kernel: Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64

  Hostname: 127.0.0.1

WorkingDir: /Users/Rex/Documents/projects/swift-lldb

  SDK Path: error: unable to locate SDK

No devices are available.

We're using the `swift-3.0-RELEASE` tag from the swift-lldb github repo to build lldb and we are building our app with Xcode 8. Are these not the same swift versions?

This error usually comes from some Swift component in you app not being built with exactly the same Swift compiler as the one that the lldb you are using is built with. For instance, if you are building your own lldb, you have to use the Swift compiler that's built in the process of building lldb.

If that's not the case we'll need to look at the logs generated by putting:

log enable -f /tmp/lldb-log.txt lldb expr types

in your ~/.lldbinit and then running your debug session. These logs can get pretty big so it's better to file a bug and attach these logs to the bug. Note, the logs get overwritten every time you start a debug session, so when you get the failure, grab the logs and add them to the bug you file.

Thanks,

Jim

>
> Hi Rex,
>
>
>
> Hi!
>
> I run lldb, platform select ios-simulator, connect to the right simulator and attach to my app and when trying to try to do anything in the repl I get the following kind of error at the bottom for an Abort, please help! The repl works fine in Xcode, not sure why it wouldn't work in this case.
>
> (lldb) process attach -n <App Name> --waitfor
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x00007fff6d4ca5e2 dyld`pread + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x00007fff6d4ca5e2 dyld`pread + 10
>
> dyld`pread:
>
> -> 0x7fff6d4ca5e2 <+10>: jae 0x7fff6d4ca5ec ; <+20>
>
> 0x7fff6d4ca5e4 <+12>: movq %rax, %rdi
>
> 0x7fff6d4ca5e7 <+15>: jmp 0x7fff6d4c9c01 ; cerror
>
> 0x7fff6d4ca5ec <+20>: retq
>
>
>
> Executable module set to "/Users/Rex/Library/Developer/CoreSimulator/Devices/ACC5BC4E-C7B1-4635-A591-6BE65F05B7EC/data/Containers/Bundle/Application/ECA295A8-DB79-4A4A-8ADE-0E616CAB0093/<App Name>.app/<App Name>".
>
> Architecture set to: x86_64h-apple-ios.
>
> (lldb) continue
>
> Process 27857 resuming
>
> (lldb) process interrupt
>
> Process 27857 stopped
>
> * thread #1: tid = 0x1eadf9, 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10, stop reason = signal SIGSTOP
>
> frame #0: 0x0000000115929f72 libsystem_kernel.dylib`mach_msg_trap + 10
>
> libsystem_kernel.dylib`mach_msg_trap:
>
> -> 0x115929f72 <+10>: retq
>
> 0x115929f73 <+11>: nop
>
>
>
> libsystem_kernel.dylib`mach_msg_overwrite_trap:
>
> 0x115929f74 <+0>: movq %rcx, %r10
>
> 0x115929f77 <+3>: movl $0x1000020, %eax ; imm = 0x1000020
>
> (lldb) repl
>
> 1> import Foundation
>
> warning: Swift error in module <App Name>.
>
> Debug info from this module will be unavailable in the debugger.
>
>
>
>
> This part looks suspicious. I'm assuming <App Name> is really something else on your end. If you do have a space in the name, you might want to try without a space as something in the toolchain might be mishandling spaces in pathnames.
>
>
> Assertion failed: (!HasFatalErrors()), function GetNumModuleSearchPaths, file /Users/Rex/Documents/projects/swift-lldb/lldb/source/Symbol/SwiftASTContext.cpp, line 3587.
>
> Abort trap: 6
>
>
>
>
>
>
> This bit above definitely means something is wrong. I suspect it's a cascading error for the debugger not being able to find debug info.
>
> There are a couple members of the team that will likely have some thoughts on what to try. I'll make sure they see this tomorrow.
>
> Thanks for passing that along,
> Todd
>
> --
> Rex Fenley | IOS DEVELOPER
>
>
> Remind.com <http://remind.com/&gt; | BLOG | FOLLOW US | LIKE US
>
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev
>
>
>
>
> --
> -Todd
> _______________________________________________
> swift-lldb-dev mailing list
> swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
> https://lists.swift.org/mailman/listinfo/swift-lldb-dev

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; | FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US <Facebook;

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; | FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US <Facebook
swift-lldb-dev mailing list
swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>
https://lists.swift.org/mailman/listinfo/swift-lldb-dev

Thanks,
- Enrico
:envelope_with_arrow: egranata@.com :phone: 27683

--
Rex Fenley | IOS DEVELOPER

Remind.com <https://www.remind.com/&gt; | BLOG <http://blog.remind.com/&gt; | FOLLOW US <https://twitter.com/remindhq&gt; | LIKE US <Facebook;

Thanks,
- Enrico
:envelope_with_arrow: egranata@.com :phone: 27683

···

On Oct 7, 2016, at 2:43 PM, Rex Fenley <rex@remind101.com> wrote:
On Fri, Oct 7, 2016 at 1:47 PM, Enrico Granata <egranata@apple.com <mailto:egranata@apple.com>> wrote:

On Oct 7, 2016, at 11:57 AM, Rex Fenley via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:
On Fri, Oct 7, 2016 at 11:30 AM, Rex Fenley <rex@remind101.com <mailto:rex@remind101.com>> wrote:
On Fri, Oct 7, 2016 at 10:48 AM, Jim Ingham <jingham@apple.com <mailto:jingham@apple.com>> wrote:
> On Oct 6, 2016, at 9:18 PM, Todd Fiala via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote:
> On Thu, Oct 6, 2016 at 5:22 PM, Rex Fenley via swift-lldb-dev <swift-lldb-dev@swift.org <mailto:swift-lldb-dev@swift.org>> wrote: