Skip to content

Commit dbbd63f

Browse files
committed
[lldb] improve debug code
1 parent 2126595 commit dbbd63f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lldb/test/API/lang/swift/tripleDetection/TestSwiftTripleDetection.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ def test(self):
2525
bkpt = target.BreakpointCreateByName("main")
2626
process = target.LaunchSimple(None, None, self.get_process_working_directory())
2727
self.expect("expression 1")
28-
with open(types_log) as f:
28+
with open(types_log,'rb') as f:
2929
import sys
30-
for line in f:
30+
for line in f.readlines():
3131
s = ""
3232
for c in line:
33-
if ord(c) > 127:
34-
s += '\\'+str(ord(c))
33+
if c > 127:
34+
s += '\\'+str(c)
3535
else:
36-
s+=c
37-
sys.stderr.write(line)
36+
s+=str(chr(c))
37+
sys.stderr.write(s)
3838
self.filecheck('platform shell cat "%s"' % types_log, __file__)
3939
# CHECK: {{SwiftASTContextForExpressions.*Module triple: ".*-apple-macos.[0-9.]+"}}
4040
# CHECK: {{SwiftASTContextForExpressions.*Target triple: ".*-apple-macos-unknown"}}

0 commit comments

Comments
 (0)