Where can I learn more lldb?

Where can I learn more about debugging swift code with lldb.
Further, if I'm not wrong, I understand lldb can be used to interact with "live" applications? Like Finder, or Music.app, etc.?

I know there are some WWDC videos, but to be quite honest they did not seem very useful. I found them to be too specific.

2 Likes

This talk was awesome: WWDC 2018 Session 412 Advanced Debugging with Xcode and LLDB. Sadly, it’s no longer available from Apple [1].

Further, if I'm not wrong, I understand lldb can be used to interact
with "live" applications? Like Finder, or Music.app, etc.?

Not by default:

% lldb
(lldb) process attach -n Finder
error: attach failed: attach failed (Not allowed to attach to process.  Look in the console messages (Console.app), near the debugserver entries, when the attach failed.  The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.)
(lldb) 

In some cases you can get around this by disabling SIP.

WARNING Don’t disable SIP on machines you care about. I only disable SIP on ‘victim’ machines, typically VMs that I wipe when I’m done.

Share and Enjoy

Quinn “The Eskimo!” @ DTS @ Apple

[1] When it was available, its URL was:

https://developer.apple.com/videos/play/wwdc2018/412/

3 Likes

it’s no longer available from Apple [1].

<snip>

[1] When it was available, its URL was:
https://developer.apple.com/videos/play/wwdc2018/412/

Just a heads-up that I've found that the videos are actually still hosted at their original addresses — it's just that the old WWDC pages themselves are down. If you view the page on The Wayback Machine, you can grab a link to the video from that page; in this case, https://devstreaming-cdn.apple.com/videos/wwdc/2018/412zw88j5aa4mr9/412/412_hd_advanced_debugging_with_xcode_and_lldb.mp4 (I removed the ?dl=1 query to play the video in the browser instead of forcing a download)

At the time of posting, the video is still playable for me.

(I do believe that the videos themselves are also archived via the Internet Archive, but accessing them is slow enough to not be easily viewable.)

2 Likes