As we learned in the previous chapters, the importance of Objective C's ability is to make decisions during the runtime rather than using traditional function calls or through vtables for dispatching dynamically. So, in this section, we will be building a tracer to monitor objc_msgSend()
just a like a proxy to understand what are the different behaviors of our target app during runtime. The purpose of building a tracer is to debug and disassemble an iOS app remotely using LLDB; this will help the testers and app developers understand the remote behavior of the app assembly level.
The following steps are involved in tracing an iOS remotely:
We will be starting
debugserver
, which we set up, and listening on port1234
, as shown in the following figure:Launch the
lldb
debugger from your MAC OS X and connect to the remote process, as demonstrated in the following screenshot, by connecting throughprocess connect connect://remote-ip:port
:Now we are all set to...