Lines Matching +full:- +full:- +full:disable +full:- +full:tools
10 # See the COPYING file in the top-level directory.
12 # SPDX-License-Identifier: GPL-2.0-or-later
24 parser.add_argument("--qemu", help="Qemu binary for test",
26 parser.add_argument("--qargs", help="Qemu arguments for test")
27 parser.add_argument("--binary", help="Binary to debug",
29 parser.add_argument("--test", help="GDB test script")
32 "The args should be preceded by -- to avoid confusion "
34 parser.add_argument("--gdb", help="The gdb binary to use",
36 parser.add_argument("--gdb-args", help="Additional gdb arguments")
37 parser.add_argument("--output", help="A file to redirect output to")
38 parser.add_argument("--stderr", help="A file to redirect stderr to")
39 parser.add_argument("--no-suspend", action="store_true",
58 args.gdb = shutil.which("gdb-multiarch")
63 exit(-1)
73 socket_dir = TemporaryDirectory("qemu-gdbstub")
81 suspend = ' -S'
83 f'{suspend} -gdb unix:path={socket_name},server=on'
89 cmd = f'{args.qemu} {args.qargs} -g {socket_name}{suspend}' \
100 gdb_cmd += " -q -n -batch"
101 # disable pagination
102 gdb_cmd += " -ex 'set pagination off'"
103 # disable prompts in case of crash
104 gdb_cmd += " -ex 'set confirm off'"
106 gdb_cmd += " -ex 'target remote %s'" % (socket_name)
110 gdb_cmd += f" -ex \"py sys.argv={args.test_args}\""
111 gdb_cmd += " -x %s" % (args.test)
127 # account of broken external tools.
129 log(output, "GDB crashed? (%d, %d) SKIPPING" % (result, result - 128))