config: Don't call sys.exit in interactive mode in run()
Review Request #1696 - Created Feb. 6, 2013 and submitted
Changeset 9496:202aa9125749 --------------------------- config: Don't call sys.exit in interactive mode in run() 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.
Tried running gem5 with the -i option. It works when the patch is applied.
Posted (Feb. 6, 2013, 11:19 p.m.)
If we were doing this over again, I'd suggest that run() should just unconditionally return exit_event.getCode() (or maybe even exit_event); then simulation scripts would have the option of doing some clean-up or other work after the simulation is done. Unfortunately this would require changing existing scripts that end with Simulation.run(...) to sys.exit(Simulation.run(...)). Maybe that's worth it though. Thoughts?