diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-05-13 00:44:49 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-05-13 00:44:49 +0000 |
commit | 52b0ffd9c62645cb9bc3a16a5cf6d1f22febe22e (patch) | |
tree | 06fb5431cb643751fd5f3a38ea9385b947c08cb6 | |
parent | a6a7e3c1f2860d0f616fdc157ccfee1a8cd22c8e (diff) | |
download | bcm5719-llvm-52b0ffd9c62645cb9bc3a16a5cf6d1f22febe22e.tar.gz bcm5719-llvm-52b0ffd9c62645cb9bc3a16a5cf6d1f22febe22e.zip |
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.
llvm-svn: 131273
-rw-r--r-- | lldb/test/lldbutil.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/test/lldbutil.py b/lldb/test/lldbutil.py index 04f98be6b2d..be026ef29b0 100644 --- a/lldb/test/lldbutil.py +++ b/lldb/test/lldbutil.py @@ -438,7 +438,13 @@ def get_args_as_string(frame): 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.""" |