[Lldb-commits] [lldb] r131273 - /lldb/trunk/test/lldbutil.py

Johnny Chen johnny.chen at apple.com
Thu May 12 17:44:49 PDT 2011


Author: johnny
Date: Thu May 12 19:44:49 2011
New Revision: 131273

URL: http://llvm.org/viewvc/llvm-project?rev=131273&view=rev
Log:
When trying to print out the function name corresponding to the frame, if the function obj
from the frame is not valid, try look for the symbol in the symbol table.

Modified:
    lldb/trunk/test/lldbutil.py

Modified: lldb/trunk/test/lldbutil.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbutil.py?rev=131273&r1=131272&r2=131273&view=diff
==============================================================================
--- lldb/trunk/test/lldbutil.py (original)
+++ lldb/trunk/test/lldbutil.py Thu May 12 19:44:49 2011
@@ -438,7 +438,13 @@
         args.append("(%s)%s=%s" % (var.GetTypeName(),
                                    var.GetName(),
                                    var.GetValue(frame)))
-    return "%s(%s)" % (frame.GetFunction().GetName(), ", ".join(args))
+    if frame.GetFunction().IsValid():
+        name = frame.GetFunction().GetName()
+    elif frame.GetSymbol().IsValid():
+        name = frame.GetSymbol().GetName()
+    else:
+        name = ""
+    return "%s(%s)" % (name, ", ".join(args))
 
 def print_registers(frame, string_buffer = False):
     """Prints all the register sets of the frame."""





More information about the lldb-commits mailing list