| |||
| Home > Semihosting > Semihosting operations > angel_SWIreason_ReportException (0x18) | |||
This SVC can be called by an application to report an exception
to the debugger directly. The most common use is to report that
execution has completed, using ADP_Stopped_ApplicationExit.
On entry R1 is set to one of the values
listed in Table 8.1 and Table 8.2. These values
are defined in angel_reasons.h.
The hardware exceptions are generated if the debugger variable vector_catch is
set to catch that exception type, and the debug agent is capable
of reporting that exception type.
Table 8.1. Hardware vector reason codes
| Name | Hexadecimal value |
|---|---|
ADP_Stopped_BranchThroughZero | 0x20000 |
ADP_Stopped_UndefinedInstr | 0x20001 |
ADP_Stopped_SoftwareInterrupt | 0x20002 |
ADP_Stopped_PrefetchAbort | 0x20003 |
ADP_Stopped_DataAbort | 0x20004 |
ADP_Stopped_AddressException | 0x20005 |
ADP_Stopped_IRQ | 0x20006 |
ADP_Stopped_FIQ | 0x20007 |
Exception handlers can use these SVCs at the end of handler chains as the default action, to indicate that the exception has not been handled.
Table 8.2. Software reason codes
| Name | Hexadecimal value |
|---|---|
ADP_Stopped_BreakPoint | 0x20020 |
ADP_Stopped_WatchPoint | 0x20021 |
ADP_Stopped_StepComplete | 0x20022 |
ADP_Stopped_RunTimeErrorUnknown | *0x20023 |
ADP_Stopped_InternalError | *0x20024 |
ADP_Stopped_UserInterruption | 0x20025 |
ADP_Stopped_ApplicationExit | 0x20026 |
ADP_Stopped_StackOverflow | *0x20027 |
ADP_Stopped_DivisionByZero | *0x20028 |
ADP_Stopped_OSSpecific | *0x20029 |
In Table 8.2, a
* next to a value indicates that the value is not supported by the
ARM debugger. The debugger reports an Unhandled ADP_Stopped
exception for these values.
No return is expected from these calls. However, it is possible
for the debugger to request that the application continue by performing
an RDI_Execute request or equivalent. In this
case, execution continues with the registers as they were on entry
to the SVC, or as subsequently modified by the debugger.