If you want to build on non-stop mode and observe program behavior without any chance of disruption by ROCGDB, you can set variables to disable all of the debugger’s attempts to modify state, whether by writing memory, inserting breakpoints, etc. These operate at a low level, intercepting operations from all commands.
When all of these are set to off, then ROCGDB is said to
be observer mode. As a convenience, the variable
observer can be set to disable these, plus enable non-stop
mode.
Note that ROCGDB will not prevent you from making nonsensical
combinations of these settings. For instance, if you have enabled
may-insert-breakpoints but disabled may-write-memory,
then breakpoints that work by writing trap instructions into the code
stream will still not be able to be placed.
set observer on ¶set observer offWhen set to on, this disables all the permission variables
below (except for insert-fast-tracepoints), plus enables
non-stop debugging. Setting this to off switches back to
normal debugging, though remaining in non-stop mode.
show observerShow whether observer mode is on or off.
set may-write-registers on ¶set may-write-registers offThis controls whether ROCGDB will attempt to alter the values of
registers, such as with assignment expressions in print, or the
jump command. It defaults to on.
show may-write-registersShow the current permission to write registers.
set may-write-memory on ¶set may-write-memory offThis controls whether ROCGDB will attempt to alter the contents
of memory, such as with assignment expressions in print. It
defaults to on.
show may-write-memoryShow the current permission to write memory.
set may-insert-breakpoints on ¶set may-insert-breakpoints offThis controls whether ROCGDB will attempt to insert breakpoints.
This affects all breakpoints, including internal breakpoints defined
by ROCGDB. It defaults to on.
show may-insert-breakpointsShow the current permission to insert breakpoints.
set may-insert-tracepoints on ¶set may-insert-tracepoints offThis controls whether ROCGDB will attempt to insert (regular)
tracepoints at the beginning of a tracing experiment. It affects only
non-fast tracepoints, fast tracepoints being under the control of
may-insert-fast-tracepoints. It defaults to on.
show may-insert-tracepointsShow the current permission to insert tracepoints.
set may-insert-fast-tracepoints on ¶set may-insert-fast-tracepoints offThis controls whether ROCGDB will attempt to insert fast
tracepoints at the beginning of a tracing experiment. It affects only
fast tracepoints, regular (non-fast) tracepoints being under the
control of may-insert-tracepoints. It defaults to on.
show may-insert-fast-tracepointsShow the current permission to insert fast tracepoints.
set may-interrupt on ¶set may-interrupt offThis controls whether ROCGDB will attempt to interrupt or stop
program execution. When this variable is off, the
interrupt command will have no effect, nor will
Ctrl-c. It defaults to on.
show may-interruptShow the current permission to interrupt or stop the program.