debug.cc File Reference
#include "rutz/debug.h"
#include "rutz/backtrace.h"
#include "rutz/mutex.h"
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <cstdio>
#include <cerrno>
Go to the source code of this file.
Defines |
#define | EVAL_IMPL(T) |
Functions |
void | GVX_DBG_REGISTER::show_position (int level, const char *where, int line_no) throw () |
| EVAL_IMPL (bool) |
| EVAL_IMPL (char) |
| EVAL_IMPL (unsigned char) |
| EVAL_IMPL (short) |
| EVAL_IMPL (int) |
| EVAL_IMPL (long) |
| EVAL_IMPL (float) |
| EVAL_IMPL (double) |
| EVAL_IMPL (const char *) |
| EVAL_IMPL (void *) |
static const char | __attribute__ ((used)) vcid_groovx_rutz_debug_cc_utc20050626084020[] |
Variables |
const int | GVX_DBG_REGISTER::MAX_KEYS = 1024 |
bool | GVX_DBG_REGISTER::g_debug_line_complete = true |
pthread_mutex_t | GVX_DBG_REGISTER::g_debug_output_mutex = PTHREAD_MUTEX_INITIALIZER |
int | GVX_DBG_REGISTER::g_debug_next_key = 0 |
unsigned char | GVX_DBG_REGISTER::g_key_levels [MAX_KEYS] |
const char * | GVX_DBG_REGISTER::g_key_filenames [MAX_KEYS] |
pthread_mutex_t | GVX_DBG_REGISTER::g_debug_keys_mutex = PTHREAD_MUTEX_INITIALIZER |
Detailed Description
debugging facilities, assertions, preconditions, postconditions, invariants
Definition in file debug.cc.
Define Documentation
Value:void rutz::debug::eval(const char* what, int level, \
const char* where, int line_no, \
bool nl, T expr) throw() \
{ \
GVX_MUTEX_LOCK(&g_debug_output_mutex); \
using std::cerr; \
cerr.exceptions(std::ios::goodbit); \
if (g_debug_line_complete) \
{ \
show_position(level, where, line_no); \
} \
if (what) \
{ \
cerr << "(" << #T << ") " << what << " = "; \
} \
cerr << expr; \
if (nl) \
{ \
cerr << "\n"; \
g_debug_line_complete = true; \
} \
else \
{ \
cerr << ", "; \
g_debug_line_complete = false; \
} \
}
Definition at line 73 of file debug.cc.