Black Friday — Promotion
Ends in ::
Get complete and immediate access to a Pro Yearly subscription with all benefits for just $399 for your first year — or lock in for two years for $599
Who is this for?
This book is for intermediate to advanced developers who want to take their debugging and code exploration game to the next level.
- Master LLDB
- Assembly calling conventions
- Customise LLDB with Python
- Real-world case studies
In Advanced Apple Debugging and Reverse Engineering, you’ll come to realize debugging is an enjoyable process to help you better understand software. Not only will you learn to find bugs faster, but you’ll also learn how other developers have solved problems...more
Learn the powerful secrets of Apple’s software debugger, LLDB!
In Advanced Apple Debugging and Reverse Engineering, you’ll come to realize debugging is an enjoyable process to help you better understand software. Not only will you learn to find bugs faster, but you’ll also learn how other developers have solved problems similar to yours.
You’ll also learn how to create custom, powerful debugging scripts that will help you quickly find the secrets behind any bit of code that piques your interest.
After reading this book, you’ll have the tools and knowledge to answer even the most obscure question about your code — or someone else’s.
This book is for intermediate-to-advanced iOS/macOS developers who are already familiar with either Swift or Objective-C and want to take their debugging skills to the next level.
Before You Begin
This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.
Section I: Beginning LLDB Commands
This section will cover the basics of using LLDB, Apple’s software debugger. You’ll explore an application named Signals, an Objective-C/Swift application that illustrates how Unix signals can be processed within an application. You’ll learn some strategies to find and create Swift syntax-style breakpoints as well as Objective-C style breakpoints. By the end of this section, you’ll be able to wield the debugger to perform most of the basic tasks needed for debugging, as well as create your own simple custom commands.
Section II: Understanding Assembly
Knowing what the computer is doing with all those 1s and 0s underneath your code is an excellent skill to have when digging for useful information about a program. This section will set you up with the theory you’ll need for the remainder of this book in order to create complex debugging scripts — and introduce you to the basic theory behind reverse-engineering code.
Section III: Low Level
With a foundation of assembler theory solidly below you, it’s time to explore other aspects of how programs work. This section is an eclectic grab-bag of weird and fun studies into reverse engineering, seldom-used APIs and debugging strategies.
Section IV: Custom LLDB Commands
You’ve learned the basic LLDB commands, the assembly that goes into code and the miscellaneous low-level concepts that make a program…well, a program.
It’s time to put that knowledge together to create some very powerful and complex debugging scripts. As you will soon see, you’re only limited by your skill and imagination — and finding the correct class (or header file) to do your debugging bidding.
LLDB ships with an integrated Python module that allows you to access most parts of the debugger through Python. This lets you leverage all the power of Python (and its modules) to help uncover whatever dark secrets vex you.
Section V: DTrace
What? Youve never heard of DTrace?! It is AWESOME! DTrace is a tool that lets you explore code in dynamic & static ways.
You can create DTrace probes to be compiled into your code (static), or you can inspect any code that is already compiled and running (dynamic). DTrace is a versatile tool: it can be a profiler, an analyzer, a debugger or anything you want.
I often will use DTrace to cast a wide-reaching net over code I want to explore, when I have no clue where I should start.