When I call GDB on my iPhone to ‘dump memory X.bin #x#### #x####’ the .bin file is empty (1.6 MB of nothing). I have tried a few different ways to attach to the app and dump it, but every time the .bin is empty. This is also the case if I run the app in the simulator and try to dump from Xcode.
I have an iPhone 4 (jailbroken) with iOS 5.0.1 with SDK 5.1 (Xcode bundle 4.4.1) and GDB version 6.3.50-20050815 (Apple version gdb-1708 + reverse.put.as patches v0.4).
Any ideas? Any suggested alternatives to GDB?
You should disable ASLR by changing the MH_PIE flag on the Mach-O header.