|Non-Confidential||PDF version||ARM DUI0446Z|
|Home > Controlling Target Execution > Handling UNIX signals|
When debugging a Linux application you can configure the debugger to stop or report when a UNIX signal is raised.
To manage UNIX signals in the debugger, either:
Select Manage Signals from the Breakpoints toolbar or the view menu.
Select the individual Signal you want to Stop or Print information, and click OK. The results are displayed in the Command view.
Use the handle command and view the results in the Command view.
SIGTRAPcannot be debugged in the same way as other signals because they are used internally by the debugger for asynchronous stopping of the process and breakpoints respectively.
If you want the application to ignore a signal, but log the event when it is triggered, then you must enable stopping on a signal.
handle SIGHUP stop print # Enable stop and print on SIGHUP signal
The following example shows how to debug a signal handler.
To do this you must disable stopping on a signal and then set a breakpoint in the signal handler. This is because if stopping on a signal is disabled then the handling of that signal is performed by the process that passes signal to the registered handler. If no handler is registered then the default handler runs and the application generally exits.
handle SIGHUP nostop noprint # Disable stop and print on SIGHUP signal