Chapters

Hide chapters

Advanced Apple Debugging & Reverse Engineering

Third Edition · iOS 12 · Swift 4.2 · Xcode 10

Before You Begin

Section 0: 3 chapters
Show chapters Hide chapters

Section III: Low Level

Section 3: 7 chapters
Show chapters Hide chapters

Section IV: Custom LLDB Commands

Section 4: 8 chapters
Show chapters Hide chapters

C. Appendix C: LLDB Bug
Written by Derek Selander

Heads up... You're reading this book for free, with parts of this chapter shown beyond this point as scrambled text.

In LLDB version 1000.11.37.1 (the version that’s packaged with Xcode 10.0), there’s a bug in LLDB that incorrectly imports the wrong headers when debugging an iOS Simulator or iOS target. Fortunately, this bug only appears when running in a Terminal session.

To see if you’re affected, open up a Terminal window and check your LLDB version:

(lldb) version
lldb-1000.11.37.1
  Swift-4.2

If you have the same version (or maybe one coming from Xcode 10.1/10.2) this will happen when debugging any iOS Simulator application:

(lldb) po @import UIKit
error: while importing modules:
error: Header search couldn't locate module UIKit

This is because LLDB is looking in the MacOS SDK directory for the UIKit headers. This also means many LLDB scripts which rely on this feature will also fail.

Fortunately, a solution to this problem can be found here: https://github.com/DerekSelander/lldb_fix

Have a technical question? Want to report a bug? You can ask questions and report bugs to the book authors in our official book forum here.
© 2024 Kodeco Inc.

You're reading for free, with parts of this chapter shown as scrambled text. Unlock this book, and our entire catalogue of books and videos, with a Kodeco Personal Plan.

Unlock now