[lldb-dev] writing an extension command in Python
Cameron McCormack
cam at mcc.id.au
Tue Jan 4 17:03:40 PST 2011
Greg Clayton:
> Now you are in the script interpreter with access to the current
> program. You should be able to get ahold of the current process and
> thread and then evaluate an expression:
>
> debugger = lldb.SBDebugger().FindDebuggerWithID(lldb.debugger_unique_id)
Thanks for the sample code, Greg! It looks like the above line is what
I need to get going.
> …
> I am not sure how SWIG will handle the "void *buf". We might need to
> add some conversion functions so that any functions that take a "void
> *buf, size_t size" pair of arguments, can take a reference to a python
> array that can be filled in.
Yeah, maybe. I’ll see how I go and if I need to tweak some SWIG
directives I’ll let you know.
> If wrote the above code in a function, you could them import your
> module and just call your function with a few parameters.
Great, so I just need to put my module on the Python path and then
import it.
Thanks,
Cameron
--
Cameron McCormack ≝ http://mcc.id.au/
More information about the lldb-dev
mailing list