diff options
author | Serge Guelton <sguelton@redhat.com> | 2019-03-21 18:27:40 +0000 |
---|---|---|
committer | Serge Guelton <sguelton@redhat.com> | 2019-03-21 18:27:40 +0000 |
commit | 525cd59f5a12254e80d5f20bf2d9713728a114d4 (patch) | |
tree | bb174d21b449a016712aa1867fdbdff781b34b15 /lldb/examples/python/scripted_step.py | |
parent | 05ea3a6be3ba172e8824a8fb66b799b3cc2c72f3 (diff) | |
download | bcm5719-llvm-525cd59f5a12254e80d5f20bf2d9713728a114d4.tar.gz bcm5719-llvm-525cd59f5a12254e80d5f20bf2d9713728a114d4.zip |
Python 2/3 compatibility: from __future__ import print_function
Differential Revision: https://reviews.llvm.org/D59580
llvm-svn: 356695
Diffstat (limited to 'lldb/examples/python/scripted_step.py')
-rw-r--r-- | lldb/examples/python/scripted_step.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lldb/examples/python/scripted_step.py b/lldb/examples/python/scripted_step.py index 453b5e229fb..3c1d5d7a6c4 100644 --- a/lldb/examples/python/scripted_step.py +++ b/lldb/examples/python/scripted_step.py @@ -93,6 +93,8 @@ # # (lldb) thread step-scripted -C scripted_step.StepWithPlan +from __future__ import print_function + import lldb @@ -186,13 +188,13 @@ class StepCheckingCondition: a_var = frame.FindVariable("a") if not a_var.IsValid(): - print "A was not valid." + print("A was not valid.") return True error = lldb.SBError() a_value = a_var.GetValueAsSigned(error) if not error.Success(): - print "A value was not good." + print("A value was not good.") return True if a_value == 20: @@ -239,6 +241,6 @@ class FinishPrintAndContinue: frame_0 = self.thread.frames[0] rax_value = frame_0.FindRegister("rax") if rax_value.GetError().Success(): - print "RAX on exit: ", rax_value.GetValue() + print("RAX on exit: ", rax_value.GetValue()) else: - print "Couldn't get rax value:", rax_value.GetError().GetCString() + print("Couldn't get rax value:", rax_value.GetError().GetCString()) |