Line data Source code
1 0 : /* exception.h - automatically selects the correct exception.h file to include */
2 :
3 : /*
4 : * Copyright (c) 2024 Meta Platforms
5 : * SPDX-License-Identifier: Apache-2.0
6 : */
7 :
8 : #ifndef ZEPHYR_INCLUDE_ARCH_EXCEPTION_H_
9 : #define ZEPHYR_INCLUDE_ARCH_EXCEPTION_H_
10 :
11 : #if defined(CONFIG_LOG)
12 : #define EXCEPTION_DUMP(...) LOG_ERR(__VA_ARGS__)
13 : #else
14 0 : #define EXCEPTION_DUMP(format, ...) printk(format "\n", ##__VA_ARGS__)
15 : #endif
16 :
17 : #if defined(CONFIG_X86_64)
18 : #include <zephyr/arch/x86/intel64/exception.h>
19 : #elif defined(CONFIG_X86)
20 : #include <zephyr/arch/x86/ia32/exception.h>
21 : #elif defined(CONFIG_ARM64)
22 : #include <zephyr/arch/arm64/exception.h>
23 : #elif defined(CONFIG_ARM)
24 : #include <zephyr/arch/arm/exception.h>
25 : #elif defined(CONFIG_ARC)
26 : #include <zephyr/arch/arc/v2/exception.h>
27 : #elif defined(CONFIG_RISCV)
28 : #include <zephyr/arch/riscv/exception.h>
29 : #elif defined(CONFIG_XTENSA)
30 : #include <zephyr/arch/xtensa/exception.h>
31 : #elif defined(CONFIG_MIPS)
32 : #include <zephyr/arch/mips/exception.h>
33 : #elif defined(CONFIG_ARCH_POSIX)
34 : #include <zephyr/arch/posix/exception.h>
35 : #elif defined(CONFIG_SPARC)
36 : #include <zephyr/arch/sparc/exception.h>
37 : #elif defined(CONFIG_RX)
38 : #include <zephyr/arch/rx/exception.h>
39 : #endif
40 :
41 : #endif /* ZEPHYR_INCLUDE_ARCH_EXCEPTION_H_ */
|