Best way to connect GDB to handle an identifier and list its ARM registers on iPhone?

Just wondering what is the most reliable / best way to connect GDB to the process ID and list its ARM registers on the iPhone (via the cocoa app)? I tried NSTask for a long time, it can list the x86 registers of a specific process (via iOS Simulator). But when deploying to iPhone, this does not work. I have not yet seen anyone perform successful asynchronous operations, such as what I am looking for on an iPhone. I was thinking of using Applescript to run a bash script using gdb commands inside, can anyone comment on the possibility of doing such a task?

Any help is much appreciated!

My attempt to use NSTask for this purpose can be found here:

GDB's strange behavior when an application is deployed on an iPhone with a jailbroken iPhone

+4
source share
1 answer

If you ask how to do this from the application, you cannot do it meaningfully on iOS. Your process is limited by the lack of access to other processes and, of course, cannot generate GDB in order to influence them in any way.

If you ask how to do this from within Xcode: select the Product menu, and then select Attach to Process . (This assumes Xcode 4. I do not remember the Xcode 3 menu item, but if you use the search bar in the Help menu, you can easily find it.)

+1
source

All Articles