| 1 | |
| 2 | |
| 3 | @@ -0,0 +1,36 @@
|
| 4 | +#pragma once
|
| 5 | +#ifdef __cplusplus
|
| 6 | +extern "C" {
|
| 7 | +#endif
|
| 8 | +#if defined(__has_include)
|
| 9 | + #if __has_include(<elfutils/libdwfl.h>)
|
| 10 | + #endif
|
| 11 | +#endif
|
| 12 | +#ifndef _EXECINFO_H
|
| 13 | +#define _EXECINFO_H 1
|
| 14 | +int backtrace(void **buffer, int size) __attribute__((weak));
|
| 15 | +char **backtrace_symbols(void *const *buffer, int size) __attribute__((weak));
|
| 16 | +void backtrace_symbols_fd(void *const *buffer, int size, int fd) __attribute__((weak));
|
| 17 | +
|
| 18 | +__attribute__((weak))
|
| 19 | +int backtrace(void **buffer, int size) {
|
| 20 | + (void)buffer; (void)size;
|
| 21 | + return 0;
|
| 22 | +}
|
| 23 | +
|
| 24 | +__attribute__((weak))
|
| 25 | +char **backtrace_symbols(void *const *buffer, int size) {
|
| 26 | + (void)buffer; (void)size;
|
| 27 | + return (char**)0;
|
| 28 | +}
|
| 29 | +
|
| 30 | +__attribute__((weak))
|
| 31 | +void backtrace_symbols_fd(void *const *buffer, int size, int fd) {
|
| 32 | + (void)buffer; (void)size; (void)fd;
|
| 33 | +}
|
| 34 | +
|
| 35 | +#endif /* _EXECINFO_H */
|
| 36 | +
|
| 37 | +#ifdef __cplusplus
|
| 38 | +}
|
| 39 | +#endif
|
| 40 | +
|