summaryrefslogtreecommitdiffstats
path: root/lldb/examples/customization/bin-utils/binutils.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/examples/customization/bin-utils/binutils.py')
-rw-r--r--lldb/examples/customization/bin-utils/binutils.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/lldb/examples/customization/bin-utils/binutils.py b/lldb/examples/customization/bin-utils/binutils.py
index 576dcba02f7..20f5a2e3143 100644
--- a/lldb/examples/customization/bin-utils/binutils.py
+++ b/lldb/examples/customization/bin-utils/binutils.py
@@ -2,6 +2,7 @@
import StringIO
+from __future__ import print_function
def binary(n, width=None):
"""
@@ -77,7 +78,7 @@ def utob(debugger, command_line, result, dict):
if width < 0:
width = 0
except:
- print utob.__doc__
+ print(utob.__doc__)
return
if len(args) > 2:
@@ -87,12 +88,12 @@ def utob(debugger, command_line, result, dict):
bits = binary(n, width)
if not bits:
- print "insufficient width value: %d" % width
+ print("insufficient width value: %d" % width)
return
if verbose and width > 0:
pos = positions(width)
- print ' ' + ' '.join(pos)
- print ' %s' % str(bits)
+ print(' ' + ' '.join(pos))
+ print(' %s' % str(bits))
def itob(debugger, command_line, result, dict):
@@ -107,7 +108,7 @@ def itob(debugger, command_line, result, dict):
if width < 0:
width = 0
except:
- print itob.__doc__
+ print(itob.__doc__)
return
if len(args) > 2:
@@ -117,9 +118,9 @@ def itob(debugger, command_line, result, dict):
bits = twos_complement(n, width)
if not bits:
- print "insufficient width value: %d" % width
+ print("insufficient width value: %d" % width)
return
if verbose and width > 0:
pos = positions(width)
- print ' ' + ' '.join(pos)
- print ' %s' % str(bits)
+ print(' ' + ' '.join(pos))
+ print(' %s' % str(bits))
OpenPOWER on IntegriCloud