Debugging a Program With dbx

Sending a Signal in a Program

The dbx cont command supports the -sig signal_name option, which allows you to resume execution of a program with the program behaving as if it had received the system signal signal_name.

For example, if a program has an interrupt handler for SIGINT (^C), you can type ^C to stop the application and return control to dbx. If you issue a cont command by itself to continue program execution, the interrupt handler never executes. To execute the interrupt handler, send the signal, sigint, to the program:


(dbx) cont -sig int

The stop, next, and detach commands accept -sig as well.