Handling processor exceptions

For bare-metal, ARM processors have the facility to trap processor exceptions. When enabled, the effect is similar to placing a breakpoint on the selected vector table entry, except that vector catches use dedicated hardware in the processor and do not use up valuable breakpoint resources. This is called vector catch. Vector catch is managed in the debugger by selecting Manage Signals from the Breakpoints view menu or you can use the handle command. You can also use the info signals command to display the current handler settings.

The vector catch events that are available are dependent on the exact processor that you are connected to.

Figure 13. Manage exception handler settings

Manage exception handler settings

Show/hideExample

If you want the debugger to catch the exception, log the event, and stop the application when the exception occurs then you must enable stopping on an exception. In the following example, a NON-SECURE_FIQ exception occurs causing the debugger to stop and print a message. You can then step or run to the handler, if present.

Example 4. Debugging an exception handler

handle NON-SECURE_FIQ stop        # Enable stop and print on a NON-SECURE_FIQ exception

If you want the exception to invoke the handler without stopping then you must disable stopping on an exception.

Example 5. Ignoring an exception

handle NON-SECURE_FIQ nostop      # Disable stop on a NON-SECURE_FIQ exception

Show/hideSee also

Copyright © 2010, 2011 ARM. All rights reserved.ARM DUI 0446H
Non-ConfidentialID111711