mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
add more gdb tests
This commit is contained in:
10
run-gdb
10
run-gdb
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user