Files
libucore/include/ucore/backtrace.h
T
Nils O. Selåsdal b4f9ecafe2 add C++ guards
2013-06-19 18:48:45 +02:00

32 lines
643 B
C

#ifndef UC_BACKTRACE_H_
#define UC_BACKTRACE_H_
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#define UC_BACTRACE_STDERR uc_backtrace_fd(2)
/**
* Print a stacktrace to the given file descriptor.
*
* @param fd filedescriptor to write to.
*/
void uc_backtrace_fd(int fd);
/**
* Print a stactrace to the given buffer
* (Note that unlike uc_backtrace_fd(), this function
* does malloc() call and may fail in a signal handler or
* if memory is corrupted.
*
* @param buf buffer to place the stacktrace in.
* @param len length of buffer
*/
void uc_backtrace_buf(char *buf, size_t len);
#ifdef __cplusplus
}
#endif
#endif