3.13 Handling processor exceptions

ARM® processors handle exceptions by jumping to one of a set of fixed addresses known as exception vectors.

Except for a Supervisor Call (SVC) or Secure Monitor Call (SMC), these events are not part of normal program flow. The events can happen unexpectedly, perhaps because of a software bug. For this reason, most ARM processors include a vector catch feature to trap these exceptions. This is most useful for bare-metal projects, or projects at an early stage of development. When an OS is running, it might use these exceptions for legitimate purposes, for example virtual memory handling.
When vector catch is enabled, the effect is similar to placing a breakpoint on the selected vector table entry. But in this case, vector catches use dedicated hardware in the processor and do not use up valuable breakpoint resources.

Note

The available vector catch events are dependent on the exact processor that you are connected to.
To manage vector catch in the debugger, either:
  • Select Manage Signals from the Breakpoints view menu to display the Manage Signals dialog box.
    For each individual signal that you want information, select either the Stop or Print option. The Stop option stops the execution and prints a message. The Print option prints a message, but continues execution. You can view these messages in the Commands view.
    Figure 3-9 Manage Signals dialog
    Manage Signals dialog

  • Use the handle command and view the results in the Command view.

Tip

HandYou can also use the info signals command to display the current handler settings.

Example 3-4 Examples

Debugging an exception handler
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 in the Commands view. You can then step or run to the handler, if present.
handle NON-SECURE_FIQ stop        # Enable stop and print on a NON-SECURE_FIQ exception
Ignoring an exception
If you want the exception to invoke the handler without stopping, then you must disable stopping on an exception.
handle NON-SECURE_FIQ nostop      # Disable stop on a NON-SECURE_FIQ exception
Related concepts
6.9 About debugging shared libraries
6.10.2 About debugging a Linux kernel
6.10.3 About debugging Linux kernel modules
Related reference
3.2 Running, stopping, and stepping through an application
5.1 Examining the target execution environment
5.2 Examining the call stack
3.12 Handling UNIX signals
11.4 Breakpoints view
11.6 Commands view
11.35 Manage Signals dialog box
Related information
DS-5 Debugger commands
Non-ConfidentialPDF file icon PDF versionARM DUI0446W
Copyright © 2010-2015 ARM. All rights reserved.