execinfo.c 638 B

12345678910111213141516171819202122232425262728
  1. #include "libmissing.h"
  2. #ifndef HAVE_EXECINFO_H
  3. #define PROGRAM_NAME "libmissing"
  4. #include "common.h"
  5. int backtrace(void **buffer, int size)
  6. {
  7. void *addr = __builtin_return_address(0);
  8. (void)buffer; (void)size;
  9. errmsg("backtrace() is not implemented. Called from %p", addr);
  10. return 0;
  11. }
  12. char **backtrace_symbols(void *const *buffer, int size)
  13. {
  14. (void)buffer; (void)size;
  15. errmsg("backtrace_symbols() is not implemented");
  16. return NULL;
  17. }
  18. void backtrace_symbols_fd(void *const *buffer, int size, int fd)
  19. {
  20. (void)buffer; (void)size; (void)fd;
  21. errmsg("backtrace_symbols_fd() is not implemented");
  22. }
  23. #endif /* !HAVE_EXECINFO_H */