[lldb-dev] debug .lldbinit with python script?

Greg Clayton gclayton at apple.com
Fri Jan 31 09:28:04 PST 2014


"command script import" takes a path to a python file, not a module name:

(lldb) command script import /tmp/mytest.py

The "script" command then can then use it:
(lldb) script mytest.do_something()

The "command script import" command will check to make sure the directory in which the python module lives is already in python's module search paths or not and it will add the directory to the imports list if needed. 

Greg

On Jan 31, 2014, at 8:26 AM, Jun Koi <junkoi2004 at gmail.com> wrote:

> hi,
> 
> i am writing a small python script for .lldbinit, meaning i put something like this in ~/.lldbinit:
> 
>        command script import mytest
> 
> however, lldb silently fails to run "mytest", and i have no idea what is wrong.
> 
> so question is: how can i debug my code? is there any way to turn on logging/debugging option, so lldb can let me know what is happening?
> 
> 
> thanks.
> Jun
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list