Custom LLDB Commands in Practice

Learn how to use custom LLDB commands to attach to common iOS apps and modify their behavior – all without access to the source code! By Derek Selander.

Leave a rating/review
Save for later
Share
You are currently viewing page 2 of 2 of this article. Click here to view the first page.

Where to Go From Here?

As you can see, there’s a lot of power in custom debugging commands. Advanced Apple Debugging & Reverse Engineering will let you take a tremendous leap forward in what you think is possible when debugging.

If you enjoyed what you learned in the tutorial, check out the complete Advanced Apple Debugging & Reverse Engineering book, available on our store.

Here’s a taste of what’s in the book:

Advanced Apple Debugging & Reverse Engineering Book Cover

  • Getting Started: Learn your way around LLDB and its extensive list of subcommands and options.
  • Python Power: Use LLDB’s Python module to create powerful, custom debugging commands to introspect and augment existing programs.
  • Understanding Assembly: Truly understand how code works at an assembler-level and how you can explore code in memory.
  • Ptrace and Friends: Learn how to leverage ptrace, dlopen and dlsym to hook into C and Swift functions to explore code that you don’t have the source for.
  • Script Bridging: Extend the debugger to make it do almost anything you want, and learn how to pass in options or arguments to your debugging scripts.
  • DTrace: Dig deep and hook into a function with a DTrace probe to query a massive amount of process information.
  • …and more!

By the end of this book, you’ll have the tools and knowledge to answer even the most obscure question about your code — or someone else’s.

To celebrate the launch of the book, it’s currently on sale for $44.99 — that’s a $10 discount off the cover price! But don’t wait too long, as the launch deal is only on until Friday, May 19th.

If you have any questions or comments on this tutorial, feel free to join the discussion below!