Ilya Leoshkevich <[email protected]> writes: > On 10/12/26 19:03, Alex Bennée wrote: >> Sometimes the debug symbols are not in the kernel binary image but in >> a separate elf blob. Provide --symbols to facilitate using them. >> Reviewed-by: Marc-André Lureau <[email protected]> >> Message-ID: <[email protected]> >> Signed-off-by: Alex Bennée <[email protected]> >> --- >> tests/guest-debug/run-test.py | 5 +++++ >> 1 file changed, 5 insertions(+) >> diff --git a/tests/guest-debug/run-test.py >> b/tests/guest-debug/run-test.py >> index 4aa24939b7d..0c7cbd137ef 100755 >> --- a/tests/guest-debug/run-test.py >> +++ b/tests/guest-debug/run-test.py >> @@ -28,6 +28,7 @@ def get_args(): >> parser.add_argument("--kargs", help="Kernel args to --append") >> parser.add_argument("--binary", help="Binary to debug", >> required=True) >> + parser.add_argument("--symbols", help="Symbol file for binary to debug") >> parser.add_argument("--test", help="GDB test script") >> parser.add_argument('test_args', nargs='*', >> help="Additional args for GDB test script. " >> @@ -114,6 +115,10 @@ def log(output, msg): >> gdb_cmd += " -ex 'set confirm off'" >> # connect to remote >> gdb_cmd += " -ex 'target remote %s'" % (socket_name) >> + >> + if args.symbols: >> + gdb_cmd += " -ex 'symbol-file %s'" % args.symbols >> + > > I would consider shlex.quote() here too. Or maybe make gdb_cmd an > array and use subprocess.call(shell=False)?
I have made it an array in the new version. > > Also, while it's probably a matter of existing code style and > personal preferences, I would use an f-string instead of %. > >> # finally the test script itself >> if args.test: >> if args.test_args: -- Alex Bennée Virtualisation Tech Lead @ Linaro
