e1ce0aefff
Use pyelftools to extract the symbol table from the link stage executable. Then, filter out the function names and sort them based on their offsets before writing into the `symtab.c`, this is similar to how the `isr_tables` works. To access the structure, simply include the new header: ```c #include <zephyr/debug/symtab.h> ``` Signed-off-by: Yong Cong Sin <ycsin@meta.com>
42 lines
578 B
CMake
42 lines
578 B
CMake
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_DEBUG_THREAD_INFO
|
|
thread_info.c
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_ASAN
|
|
asan_hacks.c
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_THREAD_ANALYZER
|
|
thread_analyzer.c
|
|
)
|
|
|
|
add_subdirectory_ifdef(
|
|
CONFIG_DEBUG_COREDUMP
|
|
coredump
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_GDBSTUB
|
|
gdbstub.c
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_GDBSTUB_SERIAL_BACKEND
|
|
gdbstub/gdbstub_backend_serial.c
|
|
)
|
|
|
|
zephyr_sources_ifdef(
|
|
CONFIG_MIPI_STP_DECODER
|
|
mipi_stp_decoder.c
|
|
)
|
|
|
|
add_subdirectory_ifdef(
|
|
CONFIG_SYMTAB
|
|
symtab
|
|
)
|