NOTE: THE IPHONE DEBUGGER IS DISCONTINUED IN IDA V5.6 BECAUSE
IT COULD HANDLE ONLY THE OUTDATED IPHONE V1.0
The iPhone debugger has the following particularities and limitations:
- Before launching the debugger, the debugger server must be copied to the iPhone/iTouch device and started. An ssh connection can be used for that. To copy the server to the device, use
scp iphone_server root@iphone_ip_address:
where iphone_ip_address must be replaced by the IP address of the device.After copying it, the server must be started on the device with
./iphone_server
The rest of debugging is similar to any remote debugging session.
- If you run the debugger server as a non-root user, please execute the following commands under administrator account:
chgrp procmod iphone_server
chmod g+s iphone_server
These commands must be executed before launching the debugger server.- There are no hardware breakpoints (does iPhone support them?)
- Since the operating system simply crashes upon modification of system libraries and since there is no way to make a local copy of a page with VM_PROT_COPY, breakpoints and single stepping in system libraries are impossible.
- Since it is impossible to put a breakpoint in the forbidden areas (see the previous point), the commands to step over, run until return and similar will fail in these areas.
- It is possible to attach and detach from running processes. however, attaching to the same process the second time does not work well.
- UNIX signals are not intercepted because of broken ptrace(). However, low level mach exceptions are handled properly. If the application accesses an unexisting memory cell or divides by zero, the debugger will intercept it.
If anothing works, use -z10000 command line switch to get more information on the screen. Furthermore, iphone_server supports -v command line switch for more debug print.
- In multithreaded applications running on multicore processors, several events may happen simutlaneously. For example, several threads may activate a breakpoint at the same time. In IDA, these events will be presented sequentially. For example, the user might decide to single step for the first presented breakpoint. In response to the user command, IDA will present all other breakpoints and only when the user will have handled all breakpoints, the execution will be resumed.
See also Start process Debugger submenu How to launch remote debugging