[lldb-dev] process calling lldb to symbolicate its own backtrace
Timothee Cour
timothee.cour2 at gmail.com
Tue Sep 24 00:32:15 PDT 2013
I'm trying to get complete stacktraces from C/C++
(backtrace/backtrace_symbols has issues, eg line numbers are often wrong
and file name omits full path), and want to use lldb for that.
from the main process A (with pidA), I tried calling lldb in a separate
process that attaches to pidA and then prints the backtrace; that works but
is slow.
So I'd like A to directly call lldb (via the C++ api) without having to
launch a separate process, but can't make it work so far:
SBDebugger.Create (works)
CreateTargetWithFileAndArch (works)
* FindFunctions (works but then GetContextAtIndex(0).GetLineEntry is
invalid)
* I also tried using ResolveFileAddress but that didn't work; not sure if
it's because I need to set the load address somehow.
Note that all the above work when calling a separate process.
Is there some example code snippet for doing that?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130924/26aea9cb/attachment.html>
More information about the lldb-dev
mailing list