Boris Shingarov has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/47360 )

Change subject: configs: Fix waiting on remote debugger
......................................................................

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 <sandi...@linux.ibm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47360
Reviewed-by: Boris Shingarov <shinga...@labware.com>
Maintainer: Boris Shingarov <shinga...@labware.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M configs/common/Options.py
M configs/example/se.py
2 files changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Boris Shingarov: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/configs/common/Options.py b/configs/common/Options.py
index 75c60a8..31ac120 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -455,7 +455,7 @@
                         "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 65acf6a..7b161e1 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -264,8 +264,7 @@
 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)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47360
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4a00b29d283df36ebf833c9125651cd6deb52a4f
Gerrit-Change-Number: 47360
Gerrit-PatchSet: 3
Gerrit-Owner: Sandipan Das <sandi...@linux.ibm.com>
Gerrit-Reviewer: Boris Shingarov <shinga...@labware.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-CC: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to