config: Don't call sys.exit in interactive mode in run()
authorAndreas Sandberg <andreas@sandberg.pp.se>
Sun, 10 Feb 2013 12:23:54 +0000 (13:23 +0100)
committerAndreas Sandberg <andreas@sandberg.pp.se>
Sun, 10 Feb 2013 12:23:54 +0000 (13:23 +0100)
The run() method in Simulation.py used to call sys.exit() when the
simulator exits. This is undesirable when user has requested the
simulator to be run in interactive mode since it causes the simulator
to exit rather than entering the interactive Python environment.

configs/common/Simulation.py

index b1e243975917aab7c74fc5d8c68dbc78d7fa9bf3..c8efd9619dc0a0e0dc4590e96c1e1b29ef51d33a 100644 (file)
@@ -507,4 +507,5 @@ def run(options, root, testsys, cpu_class):
     if options.checkpoint_at_end:
         m5.checkpoint(joinpath(cptdir, "cpt.%d"))
 
-    sys.exit(exit_event.getCode())
+    if not m5.options.interactive:
+        sys.exit(exit_event.getCode())