[lldb-dev] [LLVMdev] lldb example does not work

Chris Lattner clattner at apple.com
Thu May 21 16:41:01 PDT 2015


<adding lldb-dev>

-Chris

> On May 20, 2015, at 5:59 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
> 
> http://lldb.llvm.org/scripting.html
> 
> I am trying the above example, but shows the following error. Does
> anybody know what is wrong with it? Thanks.
> 
> (lldb) process attach -n "dictionary"
> 1 location added to breakpoint 1
> Process 25686 stopped
> (lldb) breakpoint set -n find_word
> Breakpoint 2: where = dictionary`find_word + 16 at dictionary.c:126,
> address = 0x000000010d9a9a90
> (lldb) continue
> Process 25686 resuming
> (lldb) script
> Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
>>>> import tree_utils
>>>> root = lldb.frame.FindVariable ("dictionary")
>>>> current_path = ""
>>>> path = tree_utils.DFS (root, "Romeo", current_path)
> Traceback (most recent call last):
>  File "<console>", line 1, in <module>
>  File "./tree_utils.py", line 47, in DFS
>    end = len (root_word) - 1
> TypeError: object of type 'NoneType' has no len()
> 
> -- 
> Regards,
> Peng
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the lldb-dev mailing list