LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Structure with information about a single call, parsed. More...
#include "DebugUtils.h"
Public Member Functions | |
CallInfo_t (std::string const &s) | |
CallInfo_t (const char *s) | |
operator bool () const | |
Returns whether there is some information parsed. More... | |
bool | operator! () const |
Returns whether no information was parsed out of the original. More... | |
bool | ParseString (std::string const &s) |
Returns whether the translation was complete (offset is optional!). More... | |
std::string const & | function () const |
Returns the function name (mangled if nothing better). More... | |
std::string | shortLibrary () const |
Returns only the library name (with suffix). More... | |
Public Attributes | |
std::string | original |
String from the backtrace, unparsed. More... | |
std::string | libraryName |
Parsed library name. More... | |
std::string | functionName |
Parsed function name, demangled. More... | |
std::string | mangledFunctionName |
Parsed function name, unprocessed. More... | |
void * | address = nullptr |
Function address. More... | |
std::ptrdiff_t | offset = 0 |
Instruction pointer offset. More... | |
Private Types | |
using | range_t = std::pair< size_t, size_t > |
Private Member Functions | |
void | demangleFunction () |
Runs the demangler and stores the result. More... | |
void | setAll (std::string const &s, range_t addressStr, range_t libraryStr, range_t functionStr, range_t offsetStr) |
Fills the information from an original string and parsed ranges. More... | |
Static Private Member Functions | |
static bool | emptyRange (range_t const &r) |
Returns whether the range is empty or invalid. More... | |
static std::string | extract (std::string const &s, range_t const &r) |
Translates a range into a string. More... | |
Structure with information about a single call, parsed.
Definition at line 61 of file DebugUtils.h.
|
private |
Definition at line 63 of file DebugUtils.h.
|
inline |
Definition at line 66 of file DebugUtils.h.
References ParseString().
|
inline |
Definition at line 67 of file DebugUtils.h.
References ParseString().
|
inlineprivate |
Runs the demangler and stores the result.
Definition at line 109 of file DebugUtils.h.
References setAll().
Referenced by ParseString(), and setAll().
|
inlinestaticprivate |
Returns whether the range is empty or invalid.
Definition at line 102 of file DebugUtils.h.
|
inlinestaticprivate |
Translates a range into a string.
Definition at line 105 of file DebugUtils.h.
References emptyRange().
Referenced by setAll().
|
inline |
Returns the function name (mangled if nothing better).
Definition at line 80 of file DebugUtils.h.
References functionName, and mangledFunctionName.
Referenced by lar::debug::CallInfoPrinter::print().
|
inline |
Returns whether there is some information parsed.
Definition at line 70 of file DebugUtils.h.
References libraryName, and mangledFunctionName.
|
inline |
Returns whether no information was parsed out of the original.
Definition at line 73 of file DebugUtils.h.
References libraryName, mangledFunctionName, ParseString(), and s.
bool lar::debug::CallInfo_t::ParseString | ( | std::string const & | s | ) |
Returns whether the translation was complete (offset is optional!).
Definition at line 11 of file DebugUtils.cxx.
References address, demangleFunction(), functionName, libraryName, mangledFunctionName, n, offset, original, s, and setAll().
Referenced by CallInfo_t(), and operator!().
|
private |
Fills the information from an original string and parsed ranges.
Definition at line 121 of file DebugUtils.cxx.
References address, demangleFunction(), emptyRange(), extract(), if(), libraryName, mangledFunctionName, offset, original, and s.
Referenced by demangleFunction(), and ParseString().
|
inline |
Returns only the library name (with suffix).
Definition at line 84 of file DebugUtils.h.
References libraryName.
Referenced by lar::debug::CallInfoPrinter::print().
void* lar::debug::CallInfo_t::address = nullptr |
Function address.
Definition at line 96 of file DebugUtils.h.
Referenced by ParseString(), lar::debug::CallInfoPrinter::print(), and setAll().
std::string lar::debug::CallInfo_t::functionName |
Parsed function name, demangled.
Definition at line 94 of file DebugUtils.h.
Referenced by function(), and ParseString().
std::string lar::debug::CallInfo_t::libraryName |
Parsed library name.
Definition at line 93 of file DebugUtils.h.
Referenced by operator bool(), operator!(), ParseString(), lar::debug::CallInfoPrinter::print(), setAll(), and shortLibrary().
std::string lar::debug::CallInfo_t::mangledFunctionName |
Parsed function name, unprocessed.
Definition at line 95 of file DebugUtils.h.
Referenced by function(), operator bool(), operator!(), ParseString(), lar::debug::CallInfoPrinter::print(), and setAll().
std::ptrdiff_t lar::debug::CallInfo_t::offset = 0 |
Instruction pointer offset.
Definition at line 97 of file DebugUtils.h.
Referenced by ParseString(), lar::debug::CallInfoPrinter::print(), and setAll().
std::string lar::debug::CallInfo_t::original |
String from the backtrace, unparsed.
Definition at line 92 of file DebugUtils.h.
Referenced by ParseString(), lar::debug::CallInfoPrinter::print(), and setAll().