<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">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:<div class=""><br class=""></div><div class=""><font face="Menlo-Regular" class=""><a href="https://reviews.llvm.org/D70847" class="">https://reviews.llvm.org/D70847</a></font></div><div class=""><br class=""></div><div class="">You might try:</div><div class=""><br class=""></div><div class="">target = debugger.CreateTarget("myapp", triple, platform_name, add_dependents, lldb.SBError())</div><div class=""><br class=""></div><div class="">followed by:</div><div class=""><br class=""></div><div class="">target.AddModule("myapp", triple, None, "myapp.dsym")</div><div class=""><br class=""></div><div class="">That might end up associating the symbol file for you, while it will re-use the module it first created in the CreateTarget(...) call</div><div class=""><br class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jan 25, 2020, at 8:09 AM, Yong Lam via lldb-dev <<a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""></div><div class="">I can specify myapp.dsym in the lldb command line app:</div><div class=""><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> target create --no-dependents -arch arm64 --symfile myapp.dsym myapp</div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">But how can I specify dsym file when using python API? </div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">```<br class="">target = debugger.CreateTarget(<br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""> "myapp", triple, platform_name, add_dependents, lldb.SBError())<br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">```</div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">I have search in <a href="https://github.com/llvm/llvm-project/" style="font-family:Arial,Helvetica,sans-serif" class="">https://github.com/llvm/llvm-project/</a> and <a href="https://lldb.llvm.org/python_reference/index.html" style="font-family:Arial,Helvetica,sans-serif" class="">https://lldb.llvm.org/python_reference/index.html</a> . But cannot solve it.</div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class=""><br class=""></div><div style="margin: 0px; font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; line-height: normal; font-family: "Helvetica Neue";" class="">Best regards,</div></div></div>
_______________________________________________<br class="">lldb-dev mailing list<br class=""><a href="mailto:lldb-dev@lists.llvm.org" class="">lldb-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev<br class=""></div></blockquote></div><br class=""></div></body></html>