A bozo's blog
This command will prevent your program from stopping whenever it receives a SIGUSR2 but will print it anyway.
(gdb) handle SIGUSR2 nostop noprint
This is useful in JGUI Server to prevent gdb from being stopped by SIG_CPT.