Failed to remote debugging on using command line `process connect connect://iOSIP:Port`

I’m reading the topic is LLDB and debugserver in iOS Reverse Engineering book and encountering an error in details as below.

All configuration is well.
But when I’m using the lldb of Xcode5 or Xcode6 , the command process connect connect:iOSIP:Port showed up an error as below,

(lldb) process connect connect://10.18.136.168:1234
Assertion failed: (pointer_byte_size == m_host_arch.GetAddressByteSize()), function GetHostInfo, file /SourceCache/lldb/lldb-300.2.53/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp, line 1266.
Abort trap: 6

And when I’m using the lldb of Xcode8 , the command process connect connect:iOSIP:Port showed up an error as below,

(lldb) process connect connect://10.18.136.168:1234
Process 8147 stopped
* thread #1, stop reason = signal SIGSTOP
    frame #0: 0x00000001987ace0c
error: memory read failed for 0x1987ace00

Environment:

  1. macOS Sierra
  2. Xcode 8.3.2
  3. Xcode 6.0.1
  4. Xcode 5.0.2
  5. iOS 8.2 jailbroken

I’ve tried the lldb of three versions of Xcode using the command line process connect connect://10.18.136.168:1234, all are failed.

I need help.
Whoever Thank you in advance~~

my bet is on you missing platform select xxxx

I ran the following command

VictorZhang@VictorZhang:~$ xcode-select --print-path
/Applications/Xcode5.app/Contents/Developer
VictorZhang@VictorZhang:~$ 

And I re-ran the process command, it still has an error

VictorZhang@VictorZhang:~$ /Applications/Xcode5.app/Contents/Developer/usr/bin/lldb 
(lldb) process connect connect://10.18.136.168:1234
Assertion failed: (pointer_byte_size == m_host_arch.GetAddressByteSize()), function GetHostInfo, file /SourceCache/lldb/lldb-300.2.53/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp, line 1266.
Abort trap: 6
VictorZhang@VictorZhang:~$ 

well technically I’m talking about executing

platform select remote-ios

in lldb console.

Then again I currently don’t have a local copy of Apple LLDB src, maybe you should try reading the corresponding assert source

1 个赞

Thanks for your potential tips.

I’ve found the function in here https://reviews.llvm.org/file/data/j3cbbw4262e57hrbundw/PHID-FILE-vojdaczcpqpc5h2sl6hl/file
(pointer_byte_size == m_host_arch.GetAddressByteSize()), function GetHostInfo

And it seems it is the problem of CPU Architecture.

So I re-thin the debugserver as shown below

lipo -thin arm64 debugserver -output debugserver

resign debugserver

codesign -s - --entitlements ent.plist -f debugserver

And the problem is solved.