[lldb-dev] Developing a Plugin to be loaded in LLDB from external shared libs

Abhishek Aggarwal via lldb-dev lldb-dev at lists.llvm.org
Tue Apr 26 01:48:08 PDT 2016


Hi everyone

There has been previous discussions in this mailing list regarding *E**nabling
Intel(R) Processor Trace collection in LLDB. A new APIs are being developed
to be added to SB APIs that will provide raw traces (collected on
lldb-server side). These APIs are Trace technology independent and hence
can work for other Tracing technologies also. The decoding of the raw
traces can be done outside LLDB. For details you can refer to the thread
with the subject "Review of API and remote packets" started on March 31,
2016.*

I am working on developing a Plugin that will use these new APIs to
enable *Intel(R)
Processor Trace technology and *collect raw trace data for the inferior
being debugged by LLDB. The plugin will perform decoding on the trace data
to present it as a meaningful information to the user of LLDB Debugger. I
want to use this plugin through LLDB CLI. I have few questions regarding
development of this plugin:

1. What is the best way to develop this plugin? Should it be done as shown
in "examples/plugins/commands/fooplugin.cpp" ( i.e. a C++ based solution
and using 'plugin load <path_of_shared_lib>' command) or should I go for
Python based solution to add new commands using Python functions?

2. I am planning to upstream this developed plugin in LLDB public
repository once the development is finished. Any user that wants to
use *Intel(R)
Processor Trace *will be able to do so by compiling this plugin and loading
it via LLDB CLI as an external library. What should be the ideal location
to place this plugin in LLDB repository? I could think of the 'tools'
folder.


- Abhishek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160426/e1996681/attachment.html>


More information about the lldb-dev mailing list