vdr  2.7.6
Static Public Member Functions | List of all members
cBackTrace Class Reference

#include <thread.h>

Static Public Member Functions

static cString Demangle (char *s)
 
static void BackTrace (cStringList &StringList, int Level=0, bool Mangled=false)
 
static void BackTrace (FILE *f=NULL, int Level=0, bool Mangled=false)
 
static cString GetCaller (int Level=0, bool Mangled=false)
 

Detailed Description

Definition at line 309 of file thread.h.

Member Function Documentation

◆ BackTrace() [1/2]

void cBackTrace::BackTrace ( cStringList StringList,
int  Level = 0,
bool  Mangled = false 
)
static

Produces a backtrace and stores it in the given StringList.

If Level is given, only calls up to the given value are listed. If Mangled is true, the raw backtrace will be returned and you can use Demangle() to make the function names readable.

Definition at line 520 of file thread.c.

References cVector< T >::Append(), BT_BUF_SIZE, Demangle(), and max().

Referenced by BackTrace(), cStateLockLog::Dump(), and cStateLock::Lock().

◆ BackTrace() [2/2]

void cBackTrace::BackTrace ( FILE *  f = NULL,
int  Level = 0,
bool  Mangled = false 
)
static

Produces a backtrace beginning at the given Level, and writes it to the given file.

If no file is given, the backtrace is written to the logfile. If Mangled is true, the raw backtrace will be printed/logged.

Definition at line 531 of file thread.c.

References BackTrace(), dsyslog, and cVector< T >::Size().

◆ Demangle()

cString cBackTrace::Demangle ( char *  s)
static

Demangles the function name in the given string and returns the converted version of s.

s must be one of the strings returned by a call to BackTrace() or GetCaller(). Note that this function works on the given string by inserting '\0' characters to separate the individual parts. Therefore the string will be modified upon return.

Definition at line 442 of file thread.c.

References cPipe::Close(), cPipe::Open(), cReadLine::Read(), and cString::sprintf().

Referenced by BackTrace(), cStateLockLog::Dump(), and GetCaller().

◆ GetCaller()

cString cBackTrace::GetCaller ( int  Level = 0,
bool  Mangled = false 
)
static

Returns the caller at the given Level (or the immediate caller, if Level is 0).

If Mangled is true, the raw backtrace will be returned and you can use Demangle() to make the function name readable.

Definition at line 543 of file thread.c.

References BT_BUF_SIZE, Demangle(), and max().

Referenced by cStateLockLog::Check().


The documentation for this class was generated from the following files: