Exceptions and Signals Overview

Introduction

This overview provides details of OS exceptions and debugger signals that may be encountered when debugging your Cafe OS application.

Overview of OS Exceptions and Signals

OS Exceptions

The following OS exceptions are supported by Cafe OS.

Exception Value
OS_EXCEPTION_SYSTEM_RESET 0
OS_EXCEPTION_MACHINE_CHECK 1
OS_EXCEPTION_DSI 2
OS_EXCEPTION_ISI 3
OS_EXCEPTION_EXTERNAL_INTERRUPT 4
OS_EXCEPTION_ALIGNMENT 5
OS_EXCEPTION_PROGRAM 6
OS_EXCEPTION_FLOATING_POINT 7
OS_EXCEPTION_DECREMENTER 8
OS_EXCEPTION_SYSTEM_CALL 9
OS_EXCEPTION_TRACE 10
OS_EXCEPTION_PERFORMANCE_MONITOR 11
OS_EXCEPTION_BREAKPOINT 12
OS_EXCEPTION_SYSTEM_INTERRUPT 13
OS_EXCEPTION_ICI 14
OS_EXCEPTION_MAX (OS_EXCEPTION_ICI + 1)

Debugger Signals

The following debugger signals are supported by Cafe OS.

Signal Value Description
GDBSIG0 0 No signal.
GDBSIGINT 2 Interrupt.
GDBSIGQUIT 3 Quit.
GDBSIGILL 4 Illegal instruction.
GDBSIGTRAP 5 Trace trap.
GDBSIGKILL 9 KILL trap.
GDBSIGBUS 10 Bus error.
GDBSIGSEGV 11 Segmentation error.
GDBSIGTERM 15 Termination.
GDBSIGSTOP 17 Stop (suspend).

Translations of Debugger Signals to OS Exceptions

To be more compatible with the debugger, the OS debug agent translates debugger signals to a relevant OS exception. The following table provides a translation of debugger signals to OS exceptions. In some cases, different OS exceptions may map to the same exception that is reported by the debugger.

Signal Exception
GDBSIGINT OS_EXCEPTION_SYSTEM_RESET, OS_EXCEPTION_MACHINE_CHECK, or OS_EXCEPTION_DECREMENTER
GDBSIGSEGV OS_EXCEPTION_DSI
GDBSIGBUS OS_EXCEPTION_ALIGNMENT
GDBSIGILL OS_EXCEPTION_PROGRAM
GDBSIGTRAP OS_EXCEPTION_TRACE, OS_EXCEPTION_DSI, or OS_EXCEPTION_BREAKPOINT (MULTI unlikely to issue a "Stopped by exception" message for GDBSIGTRAP).
GDBSIG0 OS exceptions not previously listed.
NOTE:
The following debugger signals are not currently translated: GDBSIGQUIT, GDBSIGKILL, GDBSIGTERM and GDBSIGSTOP.

See Also

Debug Your Application

Revision History

2014/06/27 Initial version.


CONFIDENTIAL