Difference between revisions of "Debugging on iOS 7"

From iPhone Development Wiki
Jump to: navigation, search
m (Britta moved page Debugging on iOS7 to Debugging on iOS 7 without leaving a redirect)
(rearranging and adding more context)
Line 1: Line 1:
 +
To get remote debugging working on iOS 7 and 64-bit device, see the instructions at [[debugserver]] (under "Alternative Instructions (64bit compatible)").
  
== State of Debuggers on iOS 7 ==
+
You may also be interested in [http://lldb.llvm.org/tutorial.html this explanation of "how to run lldb if you are familiar with the gdb command set"].
  
Saurik's comment:
+
== State of debuggers on iOS 7 ==
 +
 
 +
saurik [http://www.jailbreakqa.com/questions/232992/gdblldb-or-debugging-any-process-with-xcode-latest commented on JailbreakQA]:
 
<blockquote>
 
<blockquote>
The build of GDB from Xcode 4.4 (Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin) can be pseudosigned with ldid and run on a 32-bit device with reasonable success. Apple no longer maintains gdb (as it being GPL would have required them to release source code for it) nor have they released any source code for anything in Xcode 5 (including lldb, and it sounds like for LLVM they are only semi-interested in contributing their ARM64 backend... so we'll have to see on that one...); in essence, we are currently "out of luck" with regards to debugging on 64-bit devices unless someone burns a bunch of time porting or writing a debugger themselves. It sounds like you got close doing remote debugging from Xcode, though: maybe someone (you?) could work on a Substrate extension to whatever is checking process ownership on the device (probably the lldb moral equivalent of gdb-server) and publish instructions on the dev wiki?
+
The build of GDB from Xcode 4.4 (Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin) can be pseudosigned with ldid and run on a 32-bit device with reasonable success. Apple no longer maintains gdb (as it being GPL would have required them to release source code for it) nor have they released any source code for anything in Xcode 5 (including lldb, and it sounds like for LLVM they are only semi-interested in contributing their ARM64 backend... so we'll have to see on that one...); in essence, we are currently "out of luck" with regards to debugging on 64-bit devices unless someone burns a bunch of time porting or writing a debugger themselves. It sounds like you got close doing remote debugging from Xcode, though: maybe someone (you?) could work on a Substrate extension to whatever is checking process ownership on the device (probably the lldb moral equivalent of gdb-server) and publish instructions on the dev wiki?<br/>
 
+
<br/>
(edit:) On the remote debugging front, crash-x indicates there might be useful instructions for getting a remote lldb to connect through debugserver in the following presentation:
+
(edit:) On the remote debugging front, crash-x indicates there might be useful instructions for getting a remote lldb to connect through debugserver in the following presentation: https://speakerd.s3.amazonaws.com/presentations/43ca7dd05d120131795d129291fe58eb/Taking_Advantage_of_the_Runtime.pdf
 
 
https://speakerd.s3.amazonaws.com/presentations/43ca7dd05d120131795d129291fe58eb/Taking_Advantage_of_the_Runtime.pdf
 
 
</blockquote>
 
</blockquote>
  
== Remote Debugging ==
+
The information at [[debugserver]] is partially based on that presentation.
  
Information on how to get remote debugging working on iOS 7 and 64bit devices can be found in this entry: http://iphonedevwiki.net/index.php/Debugserver
+
For more detail on running GDB and pseudo-signing it with ldid for running on 32-bit devices, [http://www.pod2g.org/2012/02/working-gnu-debugger-on-ios-43.html see pod2g's instructions].

Revision as of 22:51, 17 January 2014

To get remote debugging working on iOS 7 and 64-bit device, see the instructions at debugserver (under "Alternative Instructions (64bit compatible)").

You may also be interested in this explanation of "how to run lldb if you are familiar with the gdb command set".

State of debuggers on iOS 7

saurik commented on JailbreakQA:

The build of GDB from Xcode 4.4 (Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gdb/gdb-arm-apple-darwin) can be pseudosigned with ldid and run on a 32-bit device with reasonable success. Apple no longer maintains gdb (as it being GPL would have required them to release source code for it) nor have they released any source code for anything in Xcode 5 (including lldb, and it sounds like for LLVM they are only semi-interested in contributing their ARM64 backend... so we'll have to see on that one...); in essence, we are currently "out of luck" with regards to debugging on 64-bit devices unless someone burns a bunch of time porting or writing a debugger themselves. It sounds like you got close doing remote debugging from Xcode, though: maybe someone (you?) could work on a Substrate extension to whatever is checking process ownership on the device (probably the lldb moral equivalent of gdb-server) and publish instructions on the dev wiki?

(edit:) On the remote debugging front, crash-x indicates there might be useful instructions for getting a remote lldb to connect through debugserver in the following presentation: https://speakerd.s3.amazonaws.com/presentations/43ca7dd05d120131795d129291fe58eb/Taking_Advantage_of_the_Runtime.pdf

The information at debugserver is partially based on that presentation.

For more detail on running GDB and pseudo-signing it with ldid for running on 32-bit devices, see pod2g's instructions.