summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-06-25 09:10:25 +0200
committerhjk <hjk@theqtcompany.com>2015-06-25 11:37:18 +0000
commitf886c70199fec29c53198cf3107d733c28c8ff14 (patch)
tree643bd7e6034078c49667fe22f5705d462a64b4e8 /share
parentaff02184d45c10da6c3de3c6523fac7646e922b2 (diff)
downloadqt-creator-f886c70199fec29c53198cf3107d733c28c8ff14.tar.gz
Debugger: Be more robust in case of unexpected non-ASCII output
Also correct typo in function name. Task-number: QTCREATORBUG-14629 Change-Id: I193efc3a002f83b0091f93e087f2feb19dc4f5c1 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/gdbbridge.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/share/qtcreator/debugger/gdbbridge.py b/share/qtcreator/debugger/gdbbridge.py
index 4622b22ff7..7c6de9c3a1 100644
--- a/share/qtcreator/debugger/gdbbridge.py
+++ b/share/qtcreator/debugger/gdbbridge.py
@@ -26,7 +26,7 @@ from dumper import *
#
#######################################################################
-def savePrint(output):
+def safePrint(output):
try:
print(output)
except:
@@ -47,7 +47,7 @@ def registerCommand(name, func):
def __init__(self):
super(Command, self).__init__(name, gdb.COMMAND_OBSCURE)
def invoke(self, args, from_tty):
- savePrint(func(args))
+ safePrint(func(args))
Command()
@@ -130,7 +130,7 @@ class ScanStackCommand(gdb.Command):
def invoke(self, args, from_tty):
if len(args) == 0:
args = 20
- savePrint(scanStack(gdb.parse_and_eval("$sp"), int(args)))
+ safePrint(scanStack(gdb.parse_and_eval("$sp"), int(args)))
ScanStackCommand()
@@ -438,7 +438,7 @@ class Dumper(DumperBase):
self.output.append(',partial="%d"' % isPartial)
- print(''.join(self.output))
+ safePrint(''.join(self.output))
def enterSubItem(self, item):
if not item.iname:
@@ -1619,7 +1619,7 @@ class Dumper(DumperBase):
frame = frame.older()
i += 1
- print(''.join(self.output))
+ safePrint(''.join(self.output))
def createResolvePendingBreakpointsHookBreakpoint(self, args):
class Resolver(gdb.Breakpoint):