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?
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to