ardour
Namespaces | Macros | Functions | Variables
debug.h File Reference
#include <stdint.h>
#include <sstream>
#include "pbd/libpbd_visibility.h"
#include "pbd/timing.h"

Go to the source code of this file.

Namespaces

 PBD
 
 PBD::DEBUG
 

Macros

#define DEBUG_TRACE(bits, str)   if ((bits) & PBD::debug_bits) { PBD::debug_print (# bits, str); }
 
#define DEBUG_STR_DECL(id)   std::stringstream __debug_str ## id;
 
#define DEBUG_STR(id)   __debug_str ## id
 
#define DEBUG_STR_APPEND(id, s)   __debug_str ## id << s;
 
#define DEBUG_ENABLED(bits)   ((bits) & PBD::debug_bits)
 
#define DEBUG_THREAD_SELF   pthread_self()
 
#define DEBUG_TIMING_START(bits, td)   if ((bits) & PBD::debug_bits) { td.start_timing (); }
 
#define DEBUG_TIMING_ADD_ELAPSED(bits, td)   if ((bits) & PBD::debug_bits) { td.add_elapsed (); }
 
#define DEBUG_TIMING_RESET(bits, td)   if ((bits) & PBD::debug_bits) { td.reset (); }
 

Functions

LIBPBD_API uint64_t PBD::new_debug_bit (const char *name)
 
LIBPBD_API void PBD::debug_print (const char *prefix, std::string str)
 
LIBPBD_API void PBD::set_debug_bits (uint64_t bits)
 
LIBPBD_API int PBD::parse_debug_options (const char *str)
 
LIBPBD_API void PBD::list_debug_options ()
 

Variables

LIBPBD_API uint64_t PBD::debug_bits = 0x0
 
LIBPBD_API uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful")
 
LIBPBD_API uint64_t PBD::DEBUG::Properties = PBD::new_debug_bit ("properties")
 
LIBPBD_API uint64_t PBD::DEBUG::FileManager = PBD::new_debug_bit ("filemanager")
 
LIBPBD_API uint64_t PBD::DEBUG::Pool = PBD::new_debug_bit ("pool")
 
LIBPBD_API uint64_t PBD::DEBUG::EventLoop = PBD::new_debug_bit ("eventloop")
 
LIBPBD_API uint64_t PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui")
 
LIBPBD_API uint64_t PBD::DEBUG::Configuration = PBD::new_debug_bit ("configuration")
 
uint64_t PBD::DEBUG::FileUtils = PBD::new_debug_bit ("fileutils")
 

Macro Definition Documentation

#define DEBUG_ENABLED (   bits)    ((bits) & PBD::debug_bits)

Definition at line 59 of file debug.h.

#define DEBUG_STR (   id)    __debug_str ## id

Definition at line 57 of file debug.h.

#define DEBUG_STR_APPEND (   id,
 
)    __debug_str ## id << s;

Definition at line 58 of file debug.h.

#define DEBUG_STR_DECL (   id)    std::stringstream __debug_str ## id;

Definition at line 56 of file debug.h.

#define DEBUG_THREAD_SELF   pthread_self()

Definition at line 63 of file debug.h.

#define DEBUG_TIMING_ADD_ELAPSED (   bits,
  td 
)    if ((bits) & PBD::debug_bits) { td.add_elapsed (); }

Definition at line 67 of file debug.h.

#define DEBUG_TIMING_RESET (   bits,
  td 
)    if ((bits) & PBD::debug_bits) { td.reset (); }

Definition at line 68 of file debug.h.

#define DEBUG_TIMING_START (   bits,
  td 
)    if ((bits) & PBD::debug_bits) { td.start_timing (); }

Definition at line 66 of file debug.h.

#define DEBUG_TRACE (   bits,
  str 
)    if ((bits) & PBD::debug_bits) { PBD::debug_print (# bits, str); }

Definition at line 55 of file debug.h.