Hi, it's a bit un-intuitive, but you should be able to create a target with a null pointer for the executable, and use that to attach (see CommandObjectProcessAttach::DoExecute).
BTW, if you find the existing API documentation too vague, we'd be happy to accept any improvements. cheers, pl On 30 January 2016 at 05:42, Jeffrey Tan via lldb-dev <lldb-dev@lists.llvm.org> wrote: > Hi, > > Normally if you want to attach to a process you only have the pid/name of > the process. How do you get SBTarget? Am I supposed to call > SBDebugger.CreateTargetWithFileAndArch() against a dummy executable? Why do > we require a dummy SBTarget before attaching? This seems to be a wrong > design to me... Thanks. > > > > _______________________________________________ > lldb-dev mailing list > lldb-dev@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev > _______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev