This exact `-s -S` plus `target remote localhost:1234` workflow is how Linux kernel developers debug boot-time crashes and how security researchers step through custom kernel modules without needing a second physical machine. It is the standard technique documented in the Linux kernel's own Documentation/dev-tools/gdb-kernel-debugging.rst.