Chapters

Hide chapters

Advanced Apple Debugging & Reverse Engineering

Fourth Edition · iOS 16, macOS 13.3 · Swift 5.8, Python 3 · Xcode 14

Section I: Beginning LLDB Commands

Section 1: 10 chapters
Show chapters Hide chapters

Section IV: Custom LLDB Commands

Section 4: 8 chapters
Show chapters Hide chapters

vi. Introduction
Written by Walter Tyree

Debugging has a rather bad reputation. I mean, if the developer had a complete understanding of the program, there wouldn’t be any bugs and they wouldn’t be debugging in the first place, right?

Don’t think like that.

There are always going to be bugs in your software — or any software, for that matter. No amount of test coverage imposed by your product manager is going to fix that. In fact, viewing debugging as just a process of fixing something that’s broken is actually a poisonous way of thinking that will mentally hinder your analytical abilities.

Instead, you should view debugging as simply a process to better understand a program. It’s a subtle difference, but if you truly believe it, any previous drudgery of debugging simply disappears.

The same negative connotation can also be applied to reverse engineering software. Images of masked hackers stealing bank accounts and credit cards may come to mind, but for this book, reverse engineering really is just debugging without source code — which in turn helps you gain a better understanding of a program or system.

There’s nothing wrong with reverse engineering in itself. In fact if debugging was a game, then reverse engineering is simply debugging on the “difficult” setting — which is quite a fun setting if you’ve been playing the game for a while. :]

In this book, 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 answers to any item that piques your interest, whether it’s in your code — or someone else’s.

Who This Book Is For

The art of debugging code should really be studied by every developer. However, there will be some of you that will get more out of this book. This book is written for:

  • Developers who want to become better at debugging with LLDB
  • Developers who want to build complex debugging commands with LLDB
  • Developers who want to take a deeper dive into internals of Swift and Objective-C
  • Developers who are interested in understanding what they can do to their program through reverse engineering
  • Developers who are interested in modern, proactive reverse engineering strategies
  • Developers who want to be confident in finding answers to questions they have about their computer or software

This book is for intermediate to advanced developers who want to take their debugging and code exploration game to the next level.

Custom LLDB Scripts Repo

Finally, you can find a repo of interesting LLDB Python scripts here:

https://github.com/DerekSelander/LLDB

These scripts will help aid in your debugging/reverse engineering sessions and provide novel ideas for your own LLDB scripts.

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.