summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/lldbutil/iter
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/python_api/lldbutil/iter')
-rw-r--r--lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py12
-rw-r--r--lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py16
2 files changed, 16 insertions, 12 deletions
diff --git a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
index c8ee37c1661..c8ab81317f4 100644
--- a/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -2,6 +2,8 @@
Test the iteration protocol for some lldb container objects.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -49,8 +51,8 @@ class LLDBIteratorTestCase(TestBase):
self.assertTrue(len(yours) == len(mine))
for i in range(len(yours)):
if self.TraceOn():
- print "yours[%d]='%s'" % (i, get_description(yours[i]))
- print "mine[%d]='%s'" % (i, get_description(mine[i]))
+ print("yours[%d]='%s'" % (i, get_description(yours[i])))
+ print("mine[%d]='%s'" % (i, get_description(mine[i])))
self.assertTrue(yours[i] == mine[i],
"UUID+FileSpec of yours[{0}] and mine[{0}] matches".format(i))
@@ -81,8 +83,8 @@ class LLDBIteratorTestCase(TestBase):
self.assertTrue(len(yours) == len(mine))
for i in range(len(yours)):
if self.TraceOn():
- print "yours[%d]='%s'" % (i, get_description(yours[i]))
- print "mine[%d]='%s'" % (i, get_description(mine[i]))
+ print("yours[%d]='%s'" % (i, get_description(yours[i])))
+ print("mine[%d]='%s'" % (i, get_description(mine[i])))
self.assertTrue(yours[i] == mine[i],
"ID of yours[{0}] and mine[{0}] matches".format(i))
@@ -115,6 +117,6 @@ class LLDBIteratorTestCase(TestBase):
for frame in thread:
self.assertTrue(frame.GetThread().GetThreadID() == ID)
if self.TraceOn():
- print frame
+ print(frame)
self.assertTrue(stopped_due_to_breakpoint)
diff --git a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 0a49bc2fe4a..43b5d9d1074 100644
--- a/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/lldb/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -2,6 +2,8 @@
Test the iteration protocol for frame registers.
"""
+from __future__ import print_function
+
import lldb_shared
import os, time
@@ -44,35 +46,35 @@ class RegistersIteratorTestCase(TestBase):
for frame in thread:
# Dump the registers of this frame using lldbutil.get_GPRs() and friends.
if self.TraceOn():
- print frame
+ print(frame)
REGs = lldbutil.get_GPRs(frame)
num = len(REGs)
if self.TraceOn():
- print "\nNumber of general purpose registers: %d" % num
+ print("\nNumber of general purpose registers: %d" % num)
for reg in REGs:
self.assertTrue(reg)
if self.TraceOn():
- print "%s => %s" % (reg.GetName(), reg.GetValue())
+ print("%s => %s" % (reg.GetName(), reg.GetValue()))
REGs = lldbutil.get_FPRs(frame)
num = len(REGs)
if self.TraceOn():
- print "\nNumber of floating point registers: %d" % num
+ print("\nNumber of floating point registers: %d" % num)
for reg in REGs:
self.assertTrue(reg)
if self.TraceOn():
- print "%s => %s" % (reg.GetName(), reg.GetValue())
+ print("%s => %s" % (reg.GetName(), reg.GetValue()))
REGs = lldbutil.get_ESRs(frame)
if self.platformIsDarwin():
num = len(REGs)
if self.TraceOn():
- print "\nNumber of exception state registers: %d" % num
+ print("\nNumber of exception state registers: %d" % num)
for reg in REGs:
self.assertTrue(reg)
if self.TraceOn():
- print "%s => %s" % (reg.GetName(), reg.GetValue())
+ print("%s => %s" % (reg.GetName(), reg.GetValue()))
else:
self.assertIsNone(REGs)
OpenPOWER on IntegriCloud