summaryrefslogtreecommitdiffstats
path: root/lldb/examples/python
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2015-07-20 21:22:18 +0000
committerGreg Clayton <gclayton@apple.com>2015-07-20 21:22:18 +0000
commita542e08c85d678664a42316d2a1274c68521bf74 (patch)
tree6126855542e8108a2e62e59101b77c7be172b108 /lldb/examples/python
parent0cba642a05ad0675f313e55fce29ce5273340a59 (diff)
downloadbcm5719-llvm-a542e08c85d678664a42316d2a1274c68521bf74.tar.gz
bcm5719-llvm-a542e08c85d678664a42316d2a1274c68521bf74.zip
Fix the yellow colorizing and fix some logic in the "A" packet dumper.
llvm-svn: 242709
Diffstat (limited to 'lldb/examples/python')
-rwxr-xr-xlldb/examples/python/gdbremote.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/examples/python/gdbremote.py b/lldb/examples/python/gdbremote.py
index a3159b478de..64378d8cdf6 100755
--- a/lldb/examples/python/gdbremote.py
+++ b/lldb/examples/python/gdbremote.py
@@ -129,9 +129,9 @@ class TerminalColors:
The foreground color will be set if "fg" tests True. The background color will be set if "fg" tests False.'''
if self.enabled:
if fg:
- return "\x1b[43m";
- else:
return "\x1b[33m";
+ else:
+ return "\x1b[43m";
return ''
def blue(self, fg = True):
@@ -625,9 +625,13 @@ def cmd_A(options, cmd, args):
packet = Packet(args)
while 1:
arg_len = packet.get_number()
+ if arg_len == -1:
+ break
if not packet.skip_exact_string(','):
break
arg_idx = packet.get_number()
+ if arg_idx == -1:
+ break
if not packet.skip_exact_string(','):
break;
arg_value = packet.get_hex_ascii_str(arg_len)
@@ -1138,6 +1142,7 @@ def parse_gdb_log(file, options):
print '-->',
else:
print '<--',
+
if packet[0] == '+':
if not options.quiet: print 'ACK'
continue
OpenPOWER on IntegriCloud