I'm trying to write a python script that will launch a simulator to run the
current target. In my script, I've got this code:

    foo = lldb.target.GetExecutable().__get_fullpath__()

    print foo

    print type(foo)

 

When I run it, I get this:

None

<type 'NoneType'>

 

But if I run the same commands interactively, I get the right values:

(lldb) script foo = lldb.target.GetExecutable().__get_fullpath__()

(lldb) script print foo

/usr2/ted/lldb_test/factorial

(lldb) script print type(foo)

<type 'str'>

 

After calling lldb.target.GetExecutable().__get_fullpath__() interactively,
my script starts to work.

 

Why doesn't it work in the script if I don't call it interactively? How can
I get it to work?

 

Thanks,

 

Ted

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to