I’m running into an issue in Chapter 7 in the Hunting for Code section. When I set up the breakpoint for the Objective-C block and execute
frame variable I don’t see the object referencing the block itself. Here’s is what my console looks like:
(int) sig = 23
(siginfo_t *) siginfo = 0x00007ffee9dc1c48
(UnixSignalHandler *) self = 0x0000600000c281c0
(UnixSignal *) unixSignal = 0x0000000106c2a6b9
Any idea on why I’m not able to see the block, or if there is another way to find out the address of the block so I can continue with the remaining steps of the chapter?
@lolgrep Can you please help with this when you get a chance? Thank you - much appreciated! :]
February 7, 2020, 11:00pm
Yea, I’m not sure why we are not seeing the
if we print the
<__NSMallocBlock__: some address>
Which is the same as what we should see on the instruction on the next page using the
(lldb) po ((__block_literal_5 *)0x0000618000070200)
I’m not sure why it’s not showing on LLDB. But if you want the block address to work with and continue the examples, you can obtain it from the
(lldb) po $rdi
//Your address might change so I just wrote a random number
And now you can use that Address and continue:
(lldb) po ((__block_literal_5 *)0x000061800007020A)
(lldb) p/x ((__block_literal_5 *)0x000061800007020A)->__FuncPtr
I would also like to know why the
__block_literal_5 is not showing, but in the mean time I used that to continue the lesson.
I hope it helps.
@rderik Thank you for sharing your solution - much appreciated!
June 17, 2020, 9:12am
This topic was automatically closed after 166 days. New replies are no longer allowed.