LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
DebugUtils.h File Reference

Functions to help debugging by instrumenting code. More...

#include "cetlib_except/demangle.h"
#include <cstddef>
#include <cstdlib>
#include <utility>
#include <vector>
#include <string>
#include <sstream>
#include <bitset>
#include <typeinfo>
#include <ostream>
#include <execinfo.h>

Go to the source code of this file.

Classes

struct  lar::debug::CallInfo_t
 Structure with information about a single call, parsed. More...
 
class  lar::debug::CallInfoPrinter
 Class handling the output of information in a CallInfo_t object. More...
 
struct  lar::debug::CallInfoPrinter::opt
 Set of options for printing. More...
 
struct  lar::debug::BacktracePrintOptions
 Backtrace printing options. More...
 

Namespaces

 lar
 LArSoft-specific namespace.
 
 lar::debug
 

Functions

template<typename T >
std::string lar::debug::demangle (T const *=nullptr)
 Outputs a demangled name for type T. More...
 
template<typename Stream >
Stream & lar::debug::operator<< (Stream &&out, CallInfo_t const &info)
 Helper operator to insert a call information in a stream with default options. More...
 
template<typename Stream >
void lar::debug::printBacktrace (Stream &&out, BacktracePrintOptions options)
 Prints the full backtrace into a stream. More...
 
template<typename Stream >
void lar::debug::printBacktrace (Stream &&out)
 Prints the full backtrace into a stream with default options. More...
 
template<typename Stream >
void lar::debug::printBacktrace (Stream &&out, unsigned int maxLines, std::string indent=" ", CallInfoPrinter::opt const *callInfoOptions=nullptr)
 Prints the full backtrace into a stream. More...
 

Detailed Description

Functions to help debugging by instrumenting code.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.fnal..nosp@m.gov)
Date
April 8, 2016
See also
DebugUtils.cxx

This library contains:

  • a function to return the name of the type of a variable
  • a function printing into a stream the current call stack

Definition in file DebugUtils.h.