From 724fc5fc911b770aa05c8c9f9446a09bd9638e50 Mon Sep 17 00:00:00 2001 From: Christopher Haster Date: Fri, 5 Jan 2024 13:21:59 -0600 Subject: [PATCH] Hide gdb info header from test.py/bench.py --gdb This was too noisy when intermingled with other debug output test.py/bench.py prints when dropping into gdb. --- scripts/bench.py | 4 ++++ scripts/test.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/scripts/bench.py b/scripts/bench.py index 39733013..eabfdc8f 100755 --- a/scripts/bench.py +++ b/scripts/bench.py @@ -1388,6 +1388,7 @@ def run(runner, bench_ids=[], **args): # can be helpful path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break main', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'run', @@ -1395,17 +1396,20 @@ def run(runner, bench_ids=[], **args): elif args.get('gdb_perm'): path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'run', '--args'] elif failure.assert_ is not None: cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'run', '-ex', 'frame function raise', '-ex', 'up 2', '--args'] else: cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'run', '--args'] diff --git a/scripts/test.py b/scripts/test.py index 5167ee5a..01589e07 100755 --- a/scripts/test.py +++ b/scripts/test.py @@ -1363,6 +1363,7 @@ def run(runner, test_ids=[], **args): # can be helpful path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break main', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'run', @@ -1370,12 +1371,14 @@ def run(runner, test_ids=[], **args): elif args.get('gdb_perm'): path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'run', '--args'] elif args.get('gdb_pl') is not None: path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'ignore 1 %d' % args['gdb_pl'], '-ex', 'run', @@ -1388,6 +1391,7 @@ def run(runner, test_ids=[], **args): if failure.id.count(':') >= 2 else 0) path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'ignore 1 %d' % max(powerlosses-1, 0), '-ex', 'run', @@ -1400,18 +1404,21 @@ def run(runner, test_ids=[], **args): if failure.id.count(':') >= 2 else 0) path, lineno = find_path(runner, failure.id, **args) cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'break %s:%d' % (path, lineno), '-ex', 'ignore 1 %d' % powerlosses, '-ex', 'run', '--args'] elif failure.assert_ is not None: cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'run', '-ex', 'frame function raise', '-ex', 'up 2', '--args'] else: cmd[:0] = args['gdb_path'] + [ + '-q', '-ex', 'run', '--args']