Python script gets stuck trying to continue process in lldb

I am trying to do some research on iOS, and this has to do with attaching lldb to the process. I can do this with the lldb console, however, when I try to convert it to a python script, it gets stuck in the "continuation process" for the first time and never reaches the commands at the end. Can anyone help? Thank!

import lldb
debugger = lldb.SBDebugger.Create()
debugger.SetAsync(False)
debugger.HandleCommand('platform select remote-ios')
debugger.HandleCommand('process connect connect://localhost:1234')
debugger.HandleCommand('process continue')
#other commands
+4
source share
1 answer

You are working in synchronous mode, so the "continue process" will not return until, for some reason, the process stops. You did not set any breakpoints, so it didn't work, and nothing stopped.

, :

http://llvm.org/svn/llvm-project/lldb/trunk/examples/python/process_events.py

.

+1

Source: https://habr.com/ru/post/1540735/


All Articles