OPIC
Object Persistence In C
Macros
op_assert.h File Reference

Go to the source code of this file.

Macros

#define op_stacktrace(stream)
 
#define OP_ASSERT_STACK_LIMIT   2048
 
#define op_assert(X, ...)
 assert with diagnosis messages. This macro emits the function, file, line nuber and stack traces. More...
 
#define op_assert_diagnose(X, cb, ...)
 assert with callback. More...
 

Detailed Description

Author
Felix Chern
Date
: May 2, 2016

Definition in file op_assert.h.

Macro Definition Documentation

◆ op_stacktrace

#define op_stacktrace (   stream)
Value:
do { \
void* stack[OP_ASSERT_STACK_LIMIT]; \
size_t size; \
size = backtrace(stack, OP_ASSERT_STACK_LIMIT); \
backtrace_symbols_fd(stack,size,fileno(stream)); \
abort(); \
} while(0)

Definition at line 34 of file op_assert.h.