Debugger: Use Python 3 prints also in pure LLDB bridge code

Task-number: QTCREATORBUG-22955
Change-Id: I762acd289c50fe5817b3e6e915f35c2388c74d44
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-09-16 14:01:48 +02:00
parent a90c9c6409
commit 7f29fa2030

View File

@@ -1909,7 +1909,7 @@ class LogMixin:
localz = frame.f_locals localz = frame.f_locals
instance = str(localz["self"]) + "." if 'self' in localz else '' instance = str(localz["self"]) + "." if 'self' in localz else ''
message = "%s%s(%s)%s" % (instance, fn, args, message) message = "%s%s(%s)%s" % (instance, fn, args, message)
print message print(message)
@staticmethod @staticmethod
def log_fn(arg_str = ''): def log_fn(arg_str = ''):
@@ -1944,7 +1944,7 @@ class SummaryDumper(Dumper, LogMixin):
@staticmethod @staticmethod
def warn(message): def warn(message):
print "Qt summary warning: %s" % message print("Qt summary warning: %s" % message)
@staticmethod @staticmethod
def showException(message, exType, exValue, exTraceback): def showException(message, exType, exValue, exTraceback):
@@ -1978,9 +1978,9 @@ class SummaryDumper(Dumper, LogMixin):
try: try:
from pygdbmi import gdbmiparser from pygdbmi import gdbmiparser
except ImportError: except ImportError:
print "Qt summary provider requires the pygdbmi module, " \ print("Qt summary provider requires the pygdbmi module, "
"please install using 'sudo /usr/bin/easy_install pygdbmi', " \ "please install using 'sudo /usr/bin/easy_install pygdbmi', "
"and then restart Xcode." "and then restart Xcode.")
lldb.debugger.HandleCommand('type category delete Qt') lldb.debugger.HandleCommand('type category delete Qt')
return None return None