kernel/tools/build/feature/test-backtrace.c
2024-07-22 17:22:30 +08:00

15 lines
244 B
C

// SPDX-License-Identifier: GPL-2.0
#include <execinfo.h>
#include <stdio.h>
int main(void)
{
void *backtrace_fns[10];
size_t entries;
entries = backtrace(backtrace_fns, 10);
backtrace_symbols_fd(backtrace_fns, entries, 1);
return 0;
}