Logo ROOT   6.12/07
Reference Guide
TMemStatBacktrace.h
Go to the documentation of this file.
1 // @(#)root/memstat:$Id$
2 // Author: Anar Manafov (A.Manafov@gsi.de) 2010-03-02
3 
4 /*************************************************************************
5 * Copyright (C) 1995-2010, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11 #ifndef ROOT_TMemStatBacktrace
12 #define ROOT_TMemStatBacktrace
13 
14 #define _INIT_TOP_STACK extern void *g_global_stack_end;
15 #define _GET_CALLER_FRAME_ADDR g_global_stack_end = __builtin_frame_address(1);
16 
17 // ROOT
18 #include "Rtypes.h"
19 
20 class TString;
21 
22 namespace Memstat {
23  //
24  // Backtrace functions
25  //
26  size_t getBacktrace(void **_trace, size_t _size, Bool_t _bUseGNUBuiltinBacktrace = kFALSE);
27  int getSymbols(void *_pAddr,
28  TString &_strInfo, TString &_strLib, TString &_strSymbol);
29  void getSymbolFullInfo(void *_pAddr, TString *_retInfo, const char *const _seporator = " | ");
30  void demangle(char *_codeInfo, TString &_str);
31 }
32 
33 
34 #endif
void demangle(char *_codeInfo, TString &_str)
demangle symbols
size_t getBacktrace(void **_trace, size_t _size, Bool_t _bUseGNUBuiltinBacktrace=kFALSE)
Get the backtrace _trace - array of pointers _size - maximal deepness of stack information _bUseGNUBu...
Basic string class.
Definition: TString.h:125
bool Bool_t
Definition: RtypesCore.h:59
int getSymbols(void *_pAddr, TString &_strInfo, TString &_strLib, TString &_strSymbol)
get the name of the function and library
const Bool_t kFALSE
Definition: RtypesCore.h:88
void getSymbolFullInfo(void *_pAddr, TString *_retInfo, const char *const _seporator=" | ")