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]> --- v3 - fix merge conflict now we use array for gdb_cmd --- 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 782c0c5da19..e74bb489ee1 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. " @@ -127,6 +128,10 @@ def format_cmd(cmd): gdb_cmd.extend(["-ex", "set confirm off"]) # connect to remote gdb_cmd.extend(["-ex", f"target remote {socket_name}"]) + + if args.symbols: + gdb_cmd.extend(["-ex", f"symbol-file {args.symbols}"]) + # finally the test script itself if args.test: if args.test_args: -- 2.47.3
