Question

I have extracted the debugserver and copied it to my jailbroken iPhone 5S. Then I run LLDB on my mac and connect it using the instructions here.

I copied a simple hello world program written in C and compiled for ARM64 over to my iPhone 5S using SSH/SFTP and chmod it.

I used the command: ./debugserver *:1234 helloworld64_full where the helloworld64_full is the executable file on the device.

Then I started to connect to the iPhone: platform select remote-ios and process connect connect://localhost:1234 which stops at:

Process 442 stopped
* thread #1: tid = 0x90ed, 0x0000000120085010 dyld`_dyld_start, stop reason = signal SIGSTOP
        frame #0: 0x0000000120085010 dyld`_dyld_start
    dyld`_dyld_start:
    -> 0x120085010:  add    x28, sp, 0
   0x120085014:  and    sp, x28, #0xfffffffffffffff0
   0x120085018:  movz   x0, #0
   0x12008501c:  movz   x1, #0
   (lldb) b main

However when i start to set breakpoint b main. It says:

Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.

But when i re-compile the same source program for x86-64 and debug on my mac, i can set the breakpoint. Why is this so? Please advise thanks.

Was it helpful?

Solution

Okay, I got it by actually including the file on the lldb client like so:

target create --arch arm64 helloworld_full

Basically I forgot that the same copy of the executable to be debugged has to be loaded on the client (a.k.a the mac machine)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top