How do I get source code debugging in LLDB for System Extensions?

Following the instructions found here as well as around the Developer Forums, I've successfully managed to begin debugging my system extension on a virtual machine.

Unfortunately, after archiving my system extension and copying over the .app file to my virtual machine, my .app loses access to the source code (on my host machine) and hitting any beak points via lldb yields me hard-to-read assembly code.

How do I also get source code when attaching lldb to a system extension?

Answered by DTS Engineer in 706885022

It’s basically impossible to debug an ES client interactively. The problem is one of recursion. The debugger relies on many operations that run through the ES client, so if you’ve stopped the ES client so that you can inspect its state then you basically deadlock (only recovering when the ES watchdog kicks in).

As to what you can do, see this post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

So, just checking, this is a DriverKit sysex, right?

’cause debugging other types of sysexes, most notably Endpoint Security sysexes, is much more challenging (-:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unfortunately, it is an endpoint security sysex. Sorry for the late response! Just got back from vacation.

Accepted Answer

It’s basically impossible to debug an ES client interactively. The problem is one of recursion. The debugger relies on many operations that run through the ES client, so if you’ve stopped the ES client so that you can inspect its state then you basically deadlock (only recovering when the ES watchdog kicks in).

As to what you can do, see this post.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Unfortunate to hear, but that makes sense. Thanks!

How do I get source code debugging in LLDB for System Extensions?
 
 
Q