You shouldn't have to specify it if spotlight can see your .dSYM file if you 
are on a mac. But it would be nice to have an API way to do this. The only way 
right now is to call the SBTarget::AddModule(...) function, but that won't 
correctly set the executable file and/or arch for the target correctly . There 
is a patch up for this:

https://reviews.llvm.org/D70847 <https://reviews.llvm.org/D70847>

You might try:

target = debugger.CreateTarget("myapp", triple, platform_name, add_dependents, 
lldb.SBError())

followed by:

target.AddModule("myapp", triple, None, "myapp.dsym")

That might end up associating the symbol file for you, while it will re-use the 
module it first created in the CreateTarget(...) call



> On Jan 25, 2020, at 8:09 AM, Yong Lam via lldb-dev <lldb-dev@lists.llvm.org> 
> wrote:
> 
> Hi all,
> 
> I can specify myapp.dsym in the lldb command line app:
>     target create --no-dependents -arch arm64 --symfile myapp.dsym myapp
> 
> But how can I specify dsym file when using python API? 
> 
> ```
> target = debugger.CreateTarget(
>     "myapp", triple, platform_name, add_dependents, lldb.SBError())
> ```
> 
> I have search in https://github.com/llvm/llvm-project/ 
> <https://github.com/llvm/llvm-project/> and 
> https://lldb.llvm.org/python_reference/index.html 
> <https://lldb.llvm.org/python_reference/index.html> . But cannot solve it.
> 
> 
> Best regards,
> _______________________________________________
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to