Если ваш двоичный файл равен /tmp/a.out
, а ваш dSYM равен /tmp/hide.noindex/a.out.dSYM
, это будет один из способов:
(lldb) scri
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>> dbg = lldb.SBDebugger().Create()
>>> dbg.SetAsync(False)
>>> target = dbg.CreateTarget('')
>>> modspec = lldb.SBModuleSpec()
>>> modspec.SetFileSpec(lldb.SBFileSpec("/tmp/a.out"))
>>> modspec.SetSymbolFileSpec(lldb.SBFileSpec("/tmp/hide.noindex/a.out.dSYM"))
>>> target.AddModule(modspec)
<lldb.SBModule; proxy of <Swig Object of type 'lldb::SBModule *' at 0x1077e2ea0> >
>>> target.BreakpointCreateByName("main")
<lldb.SBBreakpoint; proxy of <Swig Object of type 'lldb::SBBreakpoint *' at 0x1077e2f60> >
>>> process = target.LaunchSimple(None, None, "/tmp/")
>>> print (process)
SBProcess: pid = 87848, state = stopped, threads = 1, executable = a.out
>>> print (process.GetThreadAtIndex(0))
thread #1: tid = 0xeacb2f, 0x000000010a548fb0 a.out`main, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1