Figure 6-26 The relationship of SP, value in the stack and arguments
In most cases, the number of arguments on stack will not exceed 10, so “x/10 $sp” is
enough. Print them in order, we can get all arguments on stack.
With the combination of IDA and LLDB, we have figured out that the core in
[UIBarButtonItem _sendAction:withEvent:] is [MailAppController
sendAction:@selector(composeButtonClicked:) to:nil from:ComposeButtonItem
forEvent:UITouchesEvent], which is one step closer to our target function of “composing
email”. Next let’s figure out what does [UIApplication sendAction:to:from:forEvent:] do with
IDA, as shown in figure 6-27: