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/ and https://lldb.llvm.org/python_reference/index.html . But cannot solve it.
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:
You might try:
target = debugger.CreateTarget(“myapp”, triple, platform_name, add_dependents, lldb.SBError())
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