From e037a93eaef9ebd5da3e7df49029582f5e11a22f Mon Sep 17 00:00:00 2001 From: Boris Shingarov Date: Mon, 30 Mar 2020 08:54:12 -0400 Subject: [PATCH] configs: Add --wait-gdb as option to se.py I switch between waiting and non-waiting scenario many times per day. The BaseCPU.wait_for_remote_gdb attribute, introduced in c2baaab0ed, makes it much less painful by saving many recompiles. The present commit tries to go a bit further: the se.py script is under version control, and changing it interferes with smooth git workflow. Change-Id: Ie65ffc44b11d78d5e7878f81f2fcdafa143c20a8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27287 Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- configs/common/Options.py | 2 ++ configs/example/se.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/configs/common/Options.py b/configs/common/Options.py index b2db1ebd2..6c92f36d2 100644 --- a/configs/common/Options.py +++ b/configs/common/Options.py @@ -403,6 +403,8 @@ 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_option("--wait-gdb", default=False, + help="Wait for remote GDB to connect.") diff --git a/configs/example/se.py b/configs/example/se.py index a3cd6f14d..200a0dee5 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -275,5 +275,9 @@ else: MemConfig.config_mem(options, system) config_filesystem(system, options) +if options.wait_gdb: + for cpu in system.cpu: + cpu.wait_for_remote_gdb = True + root = Root(full_system = False, system = system) Simulation.run(options, root, system, FutureClass) -- 2.30.2