From bc52e3d6c92bb343f995c538326d2afefc65a950 Mon Sep 17 00:00:00 2001 From: Sandipan Das Date: Tue, 29 Jun 2021 15:38:06 +0530 Subject: [PATCH] configs: Fix waiting on remote debugger Commit 2c75e58cac ("sim,cpu: Move the remote GDB stub into the workload.") moved "wait_for_remote_gdb" to the Workload class. That breaks se.py since it continues to rely on that being a property of BaseCPU. This ensures that the property is now set via the current Workload instance instead. Also, owing to its boolean nature, the argument should ideally not expect any additional values. Hence, it is associated with the "store_true" action. Change-Id: I4a00b29d283df36ebf833c9125651cd6deb52a4f Signed-off-by: Sandipan Das Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47360 Reviewed-by: Boris Shingarov Maintainer: Boris Shingarov Tested-by: kokoro --- configs/common/Options.py | 2 +- configs/example/se.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configs/common/Options.py b/configs/common/Options.py index 75c60a80ef..31ac120e3e 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -455,7 +455,7 @@ def addSEOptions(parser): "to be used in syscall emulation." "Usage: gem5.opt [...] --redirects /dir1=/path/" "to/host/dir1 --redirects /dir2=/path/to/host/dir2") - parser.add_argument("--wait-gdb", default=False, + parser.add_argument("--wait-gdb", default=False, action='store_true', help="Wait for remote GDB to connect.") diff --git a/configs/example/se.py b/configs/example/se.py index 65acf6ab97..7b161e120d 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -264,8 +264,7 @@ else: system.workload = SEWorkload.init_compatible(mp0_path) if args.wait_gdb: - for cpu in system.cpu: - cpu.wait_for_remote_gdb = True + system.workload.wait_for_remote_gdb = True root = Root(full_system = False, system = system) Simulation.run(args, root, system, FutureClass)