| xj | b04a402 | 2021-11-25 15:01:52 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include <execinfo.h> | ||||
| 3 | #include <stdio.h> | ||||
| 4 | |||||
| 5 | int main(void) | ||||
| 6 | { | ||||
| 7 | void *backtrace_fns[10]; | ||||
| 8 | size_t entries; | ||||
| 9 | |||||
| 10 | entries = backtrace(backtrace_fns, 10); | ||||
| 11 | backtrace_symbols_fd(backtrace_fns, entries, 1); | ||||
| 12 | |||||
| 13 | return 0; | ||||
| 14 | } | ||||