# Advanced Apple Debugging

**URL:** https://forums.kodeco.com/c/books/advanced-apple-debugging/31.md?page=2

[Latest](https://forums.kodeco.com/latest.md) · [Categories](https://forums.kodeco.com/categories.md) · [Tags](https://forums.kodeco.com/tags.md)

**Page:** 3

---

## [A little problem puzzled me in Chapter 24](https://forums.kodeco.com/t/a-little-problem-puzzled-me-in-chapter-24/38532)

<div class="topic-metadata">

**Author:** [@hudezhi](https://forums.kodeco.com/u/hudezhi)\
**Replies:** 1\
**Last updated:** [January 13, 2018, 2:15pm UTC](https://forums.kodeco.com/t/a-little-problem-puzzled-me-in-chapter-24/38532 "2018-01-13T14:15:55Z")

</div>

in chapter 24, on the page 388, there’s such code: for the #4, I’m not really understand why we should first translate the ‘address’ to ‘sbaddr’, and then translate the section address (‘sbaddr’) back to a address in…

---

## [Chapter 10 Maps application](https://forums.kodeco.com/t/chapter-10-maps-application/37660)

<div class="topic-metadata">

**Author:** [@jayt](https://forums.kodeco.com/u/jayt)\
**Replies:** 1\
**Last updated:** [December 17, 2017, 12:58am UTC](https://forums.kodeco.com/t/chapter-10-maps-application/37660 "2017-12-17T00:58:49Z")

</div>

When I work through the last exercise of the chapter 10 (p. 139 of the PDF of version 2 of the book), the one about finding the name and receiver of the upper right button in the Maps application, I’m getting different o…

---

## [Chapter 16 custom disassembler](https://forums.kodeco.com/t/chapter-16-custom-disassembler/37302)

<div class="topic-metadata">

**Author:** [@yasroslav](https://forums.kodeco.com/u/yasroslav)\
**Replies:** 1\
**Last updated:** [December 5, 2017, 5:46pm UTC](https://forums.kodeco.com/t/chapter-16-custom-disassembler/37302 "2017-12-05T17:46:04Z")

</div>

Hello @lolgrep . First i want to say, that 16 chapter is a huge one! Thank you so for it! But i’m having the issue with the custom disassembler (dd command). I’d use some from your git repo and synced it just this month…

---

## [Chapter 16 discussion](https://forums.kodeco.com/t/chapter-16-discussion/37315)

<div class="topic-metadata">

**Author:** [@yasroslav](https://forums.kodeco.com/u/yasroslav)\
**Replies:** 1\
**Last updated:** [December 5, 2017, 4:26pm UTC](https://forums.kodeco.com/t/chapter-16-discussion/37315 "2017-12-05T16:26:19Z")

</div>

@lolgrep Once more. 16 chapter are best thing that happened to me in my life. But while going thru it i found several things: Code on the page 235 itself is not enough to shows empty popup. It ignores both UIButton p…

---

## [Chapter 1, page 34, segfault](https://forums.kodeco.com/t/chapter-1-page-34-segfault/58854)

<div class="topic-metadata">

**Author:** [@jayt](https://forums.kodeco.com/u/jayt)\
**Replies:** 3\
**Last updated:** [February 6, 2019, 1:33am UTC](https://forums.kodeco.com/t/chapter-1-page-34-segfault/58854 "2019-02-06T01:33:58Z")

</div>

I’ve been working through the first chapter of the third edition (current edition), and I’m getting a segfault when I try entering Swift code into lldb. (lldb) ex -l swift -o -- unsafeBitCast(0x0000000112021000, to: NSV…

---

## [Assembly Register Calling Convention](https://forums.kodeco.com/t/assembly-register-calling-convention/60300)

<div class="topic-metadata">

**Author:** [@mennabah](https://forums.kodeco.com/u/mennabah)\
**Replies:** 5\
**Last updated:** [January 29, 2019, 4:29pm UTC](https://forums.kodeco.com/t/assembly-register-calling-convention/60300 "2019-01-29T16:29:40Z")

</div>

Hi In the book, it says: There are 16 general purpose registers: RAX, RBX, RCX, RDX, RDI, RSI, RSP, RBP and R8 through R15. With the following Registers used as parameters when a function is called in x64 assembly: RD…

---

## [Chapter 7: Image - What is the difference between these 2 commands](https://forums.kodeco.com/t/chapter-7-image-what-is-the-difference-between-these-2-commands/60109)

<div class="topic-metadata">

**Author:** [@mennabah](https://forums.kodeco.com/u/mennabah)\
**Replies:** 2\
**Last updated:** [January 21, 2019, 5:11pm UTC](https://forums.kodeco.com/t/chapter-7-image-what-is-the-difference-between-these-2-commands/60109 "2019-01-21T17:11:06Z")

</div>

Hi Thanks @lolgrep for this great book! My question is related to “chapter 7: Image” about inspecting the block object’s members. I found out that you mentioned 2 ways for this, either by: querying for the object kn…

---

## [Chapters 23-24 - Stop on each breakpoint without honouring return value](https://forums.kodeco.com/t/chapters-23-24-stop-on-each-breakpoint-without-honouring-return-value/59792)

<div class="topic-metadata">

**Author:** [@gorloff](https://forums.kodeco.com/u/gorloff)\
**Replies:** 1\
**Last updated:** [January 15, 2019, 11:24am UTC](https://forums.kodeco.com/t/chapters-23-24-stop-on-each-breakpoint-without-honouring-return-value/59792 "2019-01-15T11:24:10Z")

</div>

As it said in book: If handler function returns True the execution will be stopped on that breakpoint In other cases, it will continue. Unfortunately, I experience the problem: The execution stops on each breakpoint …

---

## [Ch1 lldb xcode launch hangs](https://forums.kodeco.com/t/ch1-lldb-xcode-launch-hangs/37462)

<div class="topic-metadata">

**Author:** [@pauladdy](https://forums.kodeco.com/u/pauladdy)\
**Replies:** 4\
**Last updated:** [January 9, 2019, 6:40pm UTC](https://forums.kodeco.com/t/ch1-lldb-xcode-launch-hangs/37462 "2019-01-09T18:40:31Z")

</div>

Hello, I am following along in this interesting book. At chapter 1, I am trying to list Xcode 9’s Swift frameworks with the command ““(lldb) script print “\\n”.join(\[i.file.basename for i in lldb.target.modules if i.Find…

---

## [File /Applications/Xcode.app/Contents/MacOS/Xcode not working](https://forums.kodeco.com/t/file-applications-xcode-app-contents-macos-xcode-not-working/54605)

<div class="topic-metadata">

**Author:** [@williamlynn](https://forums.kodeco.com/u/williamlynn)\
**Replies:** 4\
**Last updated:** [November 5, 2018, 4:57pm UTC](https://forums.kodeco.com/t/file-applications-xcode-app-contents-macos-xcode-not-working/54605 "2018-11-05T16:57:32Z")

</div>

Using Xcode 10.1, Mojave 10.14.1 Page 26 of the book says to use “file /Applications/Xcode.app/Contents/MacOS/Xcode” but it returns a error: error: unable to find executable for ‘/Applications/Xcode.app/Contents/MacOS…

---

## [What does "out of the blue" mean?](https://forums.kodeco.com/t/what-does-out-of-the-blue-mean/48417)

<div class="topic-metadata">

**Author:** [@woorazilboy](https://forums.kodeco.com/u/woorazilboy)\
**Replies:** 3\
**Last updated:** [September 13, 2018, 9:47am UTC](https://forums.kodeco.com/t/what-does-out-of-the-blue-mean/48417 "2018-09-13T09:47:33Z")

</div>

in page 23, Using Swift requires much more typing. In addition, when stopping the debugger out of the blue, or on Objective-C code, LLDB will default to Objective-C. and page 74, You stopped the debugger out of the bl…

---

## [Missing source code for chapter19 and later](https://forums.kodeco.com/t/missing-source-code-for-chapter19-and-later/52809)

<div class="topic-metadata">

**Author:** [@jeffreytan](https://forums.kodeco.com/u/jeffreytan)\
**Replies:** 1\
**Last updated:** [October 30, 2018, 8:33pm UTC](https://forums.kodeco.com/t/missing-source-code-for-chapter19-and-later/52809 "2018-10-30T20:33:21Z")

</div>

The source code zip only contains until chapter19. Where is the source code for chapter 20 and later? Thanks!

---

## [Chapter 1, Page 32, Typo?](https://forums.kodeco.com/t/chapter-1-page-32-typo/42377)

<div class="topic-metadata">

**Author:** [@tetanuss](https://forums.kodeco.com/u/tetanuss)\
**Replies:** 1\
**Last updated:** [May 29, 2018, 11:11pm UTC](https://forums.kodeco.com/t/chapter-1-page-32-typo/42377 "2018-05-29T23:11:51Z")

</div>

I really didn’t get this paragraph… The code lines are the same (both use -l swift ???) in the first and the second case - why should there be an different output? And in fact all the lines do not run even with my memor…

---

## [Chapter 1, Page 30 and XCode 9.3](https://forums.kodeco.com/t/chapter-1-page-30-and-xcode-9-3/42376)

<div class="topic-metadata">

**Author:** [@tetanuss](https://forums.kodeco.com/u/tetanuss)\
**Replies:** 8\
**Last updated:** [October 30, 2018, 1:35pm UTC](https://forums.kodeco.com/t/chapter-1-page-30-and-xcode-9-3/42376 "2018-10-30T13:35:00Z")

</div>

the line (lldb) breakpoint modify 1 -c ‘(BOOL)\[$rdi isKindOfClass: (id)NSClassFromString(@“IDEPegasusSourceEditor.SourceCodeEditorView”)\]’ did not work in my case - just a flashing out in the console which I could not…

---

## [Unable to attach lldb to SpringBoard](https://forums.kodeco.com/t/unable-to-attach-lldb-to-springboard/52743)

<div class="topic-metadata">

**Author:** [@rmorbach](https://forums.kodeco.com/u/rmorbach)\
**Replies:** 1\
**Last updated:** [October 24, 2018, 11:07pm UTC](https://forums.kodeco.com/t/unable-to-attach-lldb-to-springboard/52743 "2018-10-24T23:07:36Z")

</div>

As I was following the section “Changing around values in registers” of Chapter 10, I am not able to attach lldb to SpringBoard process. It simply outputs unable to attach. I am using Mojave (10.14) and Xcode 10.0. Is …

---

## [Ch. 10: LLDB -o option](https://forums.kodeco.com/t/ch-10-lldb-o-option/41395)

<div class="topic-metadata">

**Author:** [@davidseibert](https://forums.kodeco.com/u/davidseibert)\
**Replies:** 4\
**Last updated:** [July 12, 2018, 11:05pm UTC](https://forums.kodeco.com/t/ch-10-lldb-o-option/41395 "2018-07-12T23:05:24Z")

</div>

Hi there, On page 141 there is the following instruction for LLDB: (lldb) breakpoint set -o -S "-\[NSWindow mouseDown:\] This yields an error: error: invalid boolean value '-S' passed for -o option Looking at (lldb) h…

---

## [Yay\_Autolayout - 'Yay\_Autolayout' is not a valid command](https://forums.kodeco.com/t/yay-autolayout-yay-autolayout-is-not-a-valid-command/38153)

<div class="topic-metadata">

**Author:** [@pauladdy](https://forums.kodeco.com/u/pauladdy)\
**Replies:** 3\
**Last updated:** [July 4, 2018, 9:02pm UTC](https://forums.kodeco.com/t/yay-autolayout-yay-autolayout-is-not-a-valid-command/38153 "2018-07-04T21:02:12Z")

</div>

Following in the book, I get the below error in the Xcode console after ctrl+o in nano and pausing execution. It’s supposed to dump out all the views in the applications, but does not. What did I miss in the instructions…

---

## [Mistake in chapter27](https://forums.kodeco.com/t/mistake-in-chapter27/39623)

<div class="topic-metadata">

**Author:** [@houjingyi](https://forums.kodeco.com/u/houjingyi)\
**Replies:** 1\
**Last updated:** [February 20, 2018, 9:01pm UTC](https://forums.kodeco.com/t/mistake-in-chapter27/39623 "2018-02-20T21:01:31Z")

</div>

Chapter 27: DTrace vs objc\_msgSend page455 Code below has syntax error. pid$target::objc\_msgSend:entry / arg0 \> 0x100000000 / && The second “/” should be deleted to avoid compile fail.Also for code provided in down…

---

## [Another mistake in chapter11](https://forums.kodeco.com/t/another-mistake-in-chapter11/39453)

<div class="topic-metadata">

**Author:** [@houjingyi](https://forums.kodeco.com/u/houjingyi)\
**Replies:** 1\
**Last updated:** [February 17, 2018, 9:55pm UTC](https://forums.kodeco.com/t/another-mistake-in-chapter11/39453 "2018-02-17T21:55:22Z")

</div>

Chapter 11: Assembly & Memory page154 memory read -fi -c10 0x1000017c0 should be memory read -fi -c10 0x100008910.

---

## [Noticed sth wrong in chapter11](https://forums.kodeco.com/t/noticed-sth-wrong-in-chapter11/39450)

<div class="topic-metadata">

**Author:** [@houjingyi](https://forums.kodeco.com/u/houjingyi)\
**Replies:** 1\
**Last updated:** [February 17, 2018, 9:51pm UTC](https://forums.kodeco.com/t/noticed-sth-wrong-in-chapter11/39450 "2018-02-17T21:51:08Z")

</div>

Chapter 11: Assembly & Memory page148 0x0000000100008910 in code and text should be 0x0000000100008ae0 according to picture in previous page.0x0000000100008910 is address of aBadMethod().

---

## [Content/Chapter Requests Here](https://forums.kodeco.com/t/content-chapter-requests-here/36481)

<div class="topic-metadata">

**Author:** [@lolgrep](https://forums.kodeco.com/u/lolgrep)\
**Replies:** 3\
**Last updated:** [January 9, 2018, 1:57pm UTC](https://forums.kodeco.com/t/content-chapter-requests-here/36481 "2018-01-09T13:57:57Z")

</div>

Hey all, I am starting a post for any content you want in upcoming versions of the dbg book. For example, @tomn has requested a chapter on Instruments as well as how to best utilize ASL. I can’t guarantee I’ll get to al…

---

## [Chapter 4 image lookup not working](https://forums.kodeco.com/t/chapter-4-image-lookup-not-working/35971)

<div class="topic-metadata">

**Author:** [@faabalia](https://forums.kodeco.com/u/faabalia)\
**Replies:** 3\
**Last updated:** [December 28, 2017, 5:44am UTC](https://forums.kodeco.com/t/chapter-4-image-lookup-not-working/35971 "2017-12-28T05:44:26Z")

</div>

Hi I am trying to do: image lookup -n “-\[UIViewController viewDidLoad\]” But there is not output in the terminal, I follow this steps: Open Xcode Open the Signal project Build and run the app Pause the app Open the te…

---

## [Installing VirtualBox Mac host and High Sierra Guest](https://forums.kodeco.com/t/installing-virtualbox-mac-host-and-high-sierra-guest/36948)

<div class="topic-metadata">

**Author:** [@dbourne](https://forums.kodeco.com/u/dbourne)\
**Replies:** 8\
**Last updated:** [December 8, 2017, 6:09am UTC](https://forums.kodeco.com/t/installing-virtualbox-mac-host-and-high-sierra-guest/36948 "2017-12-08T06:09:33Z")

</div>

Any pointers to setting this up on my Mac. The first section Page 12, after Getting Started is Getting Around Rootless and towards the bottom of the next page there is a suggestion to use VMWare or VirtualBox for a disab…

---

## [Version 2.0 and some remarks](https://forums.kodeco.com/t/version-2-0-and-some-remarks/36811)

<div class="topic-metadata">

**Author:** [@relex](https://forums.kodeco.com/u/relex)\
**Replies:** 2\
**Last updated:** [November 29, 2017, 1:43am UTC](https://forums.kodeco.com/t/version-2-0-and-some-remarks/36811 "2017-11-29T01:43:14Z")

</div>

Hey @lolgrep ! Big thanks to you for new shiny release of a most advanced iOS book in the world. It’s amazing that you’ve rebuilt so much stuff. It seems that I have to start over with new version haha! I’ve noticed tha…

---

## [The Objective-C syntax book](https://forums.kodeco.com/t/the-objective-c-syntax-book/36197)

<div class="topic-metadata">

**Author:** [@yasroslav](https://forums.kodeco.com/u/yasroslav)\
**Replies:** 1\
**Last updated:** [November 3, 2017, 4:45am UTC](https://forums.kodeco.com/t/the-objective-c-syntax-book/36197 "2017-11-03T04:45:25Z")

</div>

Sorry for kind of offtopic. But it seems that all stuff about debugging and reverse engineering is focused on Objective-C. And as for me there’s a problem — i’d start to learning iOS and macOS develop from swift, so i’ve…

---

## [Can't create instances of Apple private classes in segment 's'?](https://forums.kodeco.com/t/cant-create-instances-of-apple-private-classes-in-segment-s/35570)

<div class="topic-metadata">

**Author:** [@jerrykrinock](https://forums.kodeco.com/u/jerrykrinock)\
**Replies:** 2\
**Last updated:** [October 17, 2017, 12:14am UTC](https://forums.kodeco.com/t/cant-create-instances-of-apple-private-classes-in-segment-s/35570 "2017-10-17T00:14:26Z")

</div>

Great book – I think I’m eventually going to have to read all the way through to Chapter 27. I’m only up to Chapter 6 so far, but have come to a stumbling block. I need my macOS app to do some stuff which only Safari c…

---

## [How to find a code for a specific view displayed in a simulator or on the device?](https://forums.kodeco.com/t/how-to-find-a-code-for-a-specific-view-displayed-in-a-simulator-or-on-the-device/34483)

<div class="topic-metadata">

**Author:** [@tomn](https://forums.kodeco.com/u/tomn)\
**Replies:** 4\
**Last updated:** [October 4, 2017, 9:16pm UTC](https://forums.kodeco.com/t/how-to-find-a-code-for-a-specific-view-displayed-in-a-simulator-or-on-the-device/34483 "2017-10-04T21:16:16Z")

</div>

Hi! I’m debugging a complex application with lots of protocols, view controllers etc… The app is a variation of VIPER architecture. The app is written in Swift 3 and uses iOS 10.3. The codebase is huge and it is about t…

---

## [Seeking clarification on book Advanced Apple Debugging & Reverse Engineering subject](https://forums.kodeco.com/t/seeking-clarification-on-book-advanced-apple-debugging-reverse-engineering-subject/35061)

<div class="topic-metadata">

**Author:** [@spgms](https://forums.kodeco.com/u/spgms)\
**Replies:** 2\
**Last updated:** [October 3, 2017, 2:54am UTC](https://forums.kodeco.com/t/seeking-clarification-on-book-advanced-apple-debugging-reverse-engineering-subject/35061 "2017-10-03T02:54:46Z")

</div>

I’m really interested in this book, but before I buy it I want to understand a bit about it and get clarification on an assumption. I’m assuming that because the book title is Advanced Apple Debugging & Reverse Engineeri…

---

## [Finally, I'm so happy :)](https://forums.kodeco.com/t/finally-im-so-happy/29401)

<div class="topic-metadata">

**Author:** [@ignazioc](https://forums.kodeco.com/u/ignazioc)\
**Replies:** 2\
**Last updated:** [September 29, 2017, 7:30pm UTC](https://forums.kodeco.com/t/finally-im-so-happy/29401 "2017-09-29T19:30:10Z")

</div>

I’m so glad that you released this version of the book. I have a debug kung-fu master colleague and I need to learn quick some tips and trick :slight\_smile:

---

## ["-\[NSView hitTest:\]" breakpoint not working properly](https://forums.kodeco.com/t/nsview-hittest-breakpoint-not-working-properly/29942)

<div class="topic-metadata">

**Author:** [@kakubei](https://forums.kodeco.com/u/kakubei)\
**Replies:** 3\
**Last updated:** [September 29, 2017, 7:24pm UTC](https://forums.kodeco.com/t/nsview-hittest-breakpoint-not-working-properly/29942 "2017-09-29T19:24:33Z")

</div>

In Xcode 8.3.2 the first breakpoint in the book: "-\[NSView hitTest:\]" will not work properly. It will always stop, even when not clicking anything on this process: \<\_NSThemeCloseWidget: 0x10e856f10\> This is true, regar…

[Previous page](https://forums.kodeco.com/c/books/advanced-apple-debugging/31.md?page=1)

[Next page](https://forums.kodeco.com/c/books/advanced-apple-debugging/31.md?page=3)
