MonitorUI
Reason for this page: defining the intended behaviour of the monitor (g)ui to maintain consistency across ports and to prevent needless work :)
General Behaviour
Entering the monitor
- exit fullscreen mode if needed
- if monitor window is not visible, enable it
- transfer focus to the monitor window
Leaving the monitor
- restore fullscreen mode, make emulation window visible
- transfer focus to the emulator window
Single stepping should not close the monitor. There's no need to set the focus back to the emulator window for a single assembly instruction.
Reasons for keeping the monitor open or for closing it
Keeping the monitor open
The console driver is capable of outputting text even when the monitor is not active (ie when the emulation is running). This can be useful because eg trace/watch output shows up immediately.
Additionally developers may want to look at the last monitor output (e.g. a piece of disassembly) while the emulation runs.
Close on exit
Exiting the monitor closes the monitor window, closing the monitor window exits the monitor respectively. The emulation continues and no monitor window clobbers the screen anymore. This is the default behavior, which is also (exclusively) used by most ports.
Proposed Solution
The existing command exit (x) shall close the monitor window and continue the emulation. A close button of the monitor window (if any) shall act in the same way as the command exit.
To be able to keep the monitor window open even when the emulation is re-started, a new command cont (continue) is to be added.
- this command should have a one-character shortcut (c) Gpz 09:38, 14 March 2012 (UTC)
These two commands allow the user to to do what he wants in any situation.
To be clarified: Should exit close the link to a remote monitor?
- when issued from remote? i would say so Gpz 09:38, 14 March 2012 (UTC)
Implementation
keep open on exit
This is optional behavior which is only available on ports that support it (currently: win32, gtk, xaw). It should be enabled if both console_log->console_can_stay_open and KeepMonitorOpen are 1
- the monitor window stays open all the time, except for when the user closes the window.
- TODO: this creates the problem that the monitor window might be closed, although console_log->console_can_stay_open and KeepMonitorOpen are 1. This must be handled somehow by switching between buffered and non buffered mode at runtime.
- entering and exiting the monitor only transfers focus to/from the emulation window respectively