mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
An exception which no handler consumed ended in rtems_fatal_error_occurred(1), which is INTERNAL_ERROR_RTEMS_API, where every other port reports RTEMS_FATAL_SOURCE_EXCEPTION with the exception frame as the code. A fatal error extension cannot recognise the former, so a test which expects an exception and returns from its extension with longjmp() could not resume. That pattern is how tc-compiler-builtins.c checks the break which the compiler emits for a division by zero, and it stopped ts-unit-no-clock-0. The exception vectors are dispatched like interrupt vectors and the GDB stub installs handlers on several of them, so the dispatch stays and the frame of the exception being vectored is published for the default handler to recognise. Report a vector without a frame as a spurious interrupt, which is what the shared default handler does. Do not print here. The fatal error extension prints the frame when the system really terminates, so a recovered exception stays silent instead of writing two lines into the test output on every recovery. The cause table moves next to _CPU_Exception_frame_print(), which gains the cause of the exception it prints. Update #5691. Assisted-by: Claude:claude-opus-5 claude-code Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>