1 // SPDX-License-Identifier: GPL-2.0 << 2 #include <execinfo.h> 1 #include <execinfo.h> 3 #include <stdio.h> 2 #include <stdio.h> 4 3 5 int main(void) 4 int main(void) 6 { 5 { 7 void *backtrace_fns[10]; 6 void *backtrace_fns[10]; 8 size_t entries; 7 size_t entries; 9 8 10 entries = backtrace(backtrace_fns, 10) 9 entries = backtrace(backtrace_fns, 10); 11 backtrace_symbols_fd(backtrace_fns, en 10 backtrace_symbols_fd(backtrace_fns, entries, 1); 12 11 13 return 0; 12 return 0; 14 } 13 } 15 14
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.