add more gdb tests

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2018-11-09 00:00:02 +00:00
parent c1f060ca65
commit d697640584
6 changed files with 100 additions and 1 deletions

10
run-gdb
View File

@@ -64,6 +64,10 @@ class GdbTestcase:
self.sendline('printf "%d\\n", {}'.format(int_id))
return int(self.before())
def get_float(self, float_id):
self.sendline('printf "%f\\n", {}'.format(float_id))
return float(self.before())
def find_line(self, lineid):
'''
Search for the first line that contains a comment line
@@ -107,7 +111,11 @@ def main(args, extra_args=None):
elif args.verbose:
# The output of this would affect the tests.
# https://stackoverflow.com/questions/13496389/gdb-remote-protocol-how-to-analyse-packets
before.extend(['-ex', 'set debug remote 1', common.Newline])
# Also be opinionated and set remotetimeout to allow you to step debug the emulator at the same time.
before.extend([
'-ex', 'set debug remote 1', common.Newline,
'-ex', 'set remotetimeout 99999', common.Newline,
])
if args.break_at is not None:
break_at = ['-ex', 'break {}'.format(args.break_at), common.Newline]
else: