> On Feb 18, 2015, at 12:06 PM, Mike McLaughlin <mi...@microsoft.com> wrote:
> 
> I have a couple of questions about lldb:
> 
> 1) I building a lldb command plugin for dotnet/coreclr (sos for lldb) and it 
> currently depends on the lldb source (API h files) and the lldb build. Is 
> there a package that includes just the public h and library files necessary 
> to build a lldb plugin?  I’ve heard there is one for llvm.  Or am I stuck 
> enlisting and building lldb to build my plugin?

Why don't you do this in Python?

http://lldb.llvm.org/python-reference.html

See section titled "CREATE A NEW LLDB COMMAND USING A PYTHON FUNCTION"

This keeps you isolated from having to link against anything at all.

> 
> 2) Is there any way to get the plugin’s load path?  I want to load another 
> module dynamically in the same directory as my lldb plugin.  I’m still 
> learning about linux and lldb but it doesn’t look like there is a lldb api or 
> the equivalent of Windows the hmodule passed to the DllMain.


int some_function_in_your_plugin()
{
}

Then you can ask the host to locate the module for a specific function:

 FileSpec plugin_file_spec = 
Host::GetModuleFileSpecForHostAddress(reinterpret_cast<void 
*>(reinterpret_cast<intptr_t>(some_function_in_your_plugin))));


_______________________________________________
lldb-dev mailing list
lldb-dev@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to