<div dir="ltr">(Using OSX 10.10.1, XCode 6.1.1 6A2008a, lldb-320.4.156, Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) )<br> <br>Hi all,<br>I have just started using LLDB and its Python scripting interface.<br><br>I may have stumbled upon a deep bug related to null pointer treatment.<br><br><a href="http://lldb.llvm.org/scripting.html">http://lldb.llvm.org/scripting.html</a> I tried to follow this scripting tutorial.<br><br><a href="http://pastebin.com/S0RhVG3s">http://pastebin.com/S0RhVG3s</a> This is the output of my interaction with the lldb and the python script. (I haven't modified any part of the example code there)<br><br>It seems like `if left_child_ptr.GetValue() == None:` expression (and other similar expressions) doesn't evaluate to true for null pointers<br><br>I was able to cook up a python check for null pointer:<br><br><font face="monospace, monospace">def IsNullPtr(ptr):<br><br>  ptr_string = str(ptr.GetValue())<br><br>  if re.search('[1-9a-fA-F]', ptr_string):<br><br>    return False;<br><br>  else:<br><br>    return True;</font><br><br>I discussed this on the irc channel and zturner thought it looked like a bug and that I should post it here.<br><br>Hope this helps.<br>Please let me know if there is a standard way to do null pointer check through the python API. Especially a check for nullptr shared_ptrs.<br><div><br></div></div>