When using remote kernel GDB in many environments, commands that reboot are usually an accident. This includes exiting GDB, so this includes accidental EOF, closing the terminal, and similar human errors. Furthermore, some systems/environments/applications do not respond kindly to resuming execution after stopping in the debugger for a long time, so resuming is effectively the same as rebooting. This loses essential debugger state, which might take a lot of time and work to reproduce.
Disable such commands by default. If you really want to use them:
- Use the ddb equivalent.
- Enable them with "set gdb_can_resume = 1" in gdb.
- Enable them with debug.gdb.can_resume=1 in /boot/loader.conf or /etc/sysctl.conf.
MFC after: 1 week
Sponsored by: Dell EMC Isilon