proxygen
|
#include <Symbolizer.h>
Public Types | |
enum | Options { NO_FILE_AND_LINE = 1 << 0, TERSE = 1 << 1, COLOR = 1 << 2, COLOR_IF_TTY = 1 << 3, NO_FRAME_ADDRESS = 1 << 4 } |
enum | Color { DEFAULT, RED, GREEN, YELLOW, BLUE, CYAN, WHITE, PURPLE, NUM } |
Public Member Functions | |
void | print (uintptr_t address, const SymbolizedFrame &frame) |
void | println (uintptr_t address, const SymbolizedFrame &frame) |
void | println (const uintptr_t *addresses, const SymbolizedFrame *frames, size_t frameCount) |
void | print (StringPiece sp) |
template<size_t N> | |
void | println (const FrameArray< N > &fa, size_t skip=0) |
virtual void | flush () |
virtual | ~SymbolizePrinter () |
void | color (Color c) |
Protected Member Functions | |
SymbolizePrinter (int options, bool isTty=false) | |
Protected Attributes | |
const int | options_ |
const bool | isTty_ |
Private Member Functions | |
void | printTerse (uintptr_t address, const SymbolizedFrame &frame) |
virtual void | doPrint (StringPiece sp)=0 |
Static Private Attributes | |
static constexpr std::array< const char *, Color::NUM > | kColorMap |
Print a list of symbolized addresses. Base class.
Definition at line 180 of file Symbolizer.h.
Enumerator | |
---|---|
DEFAULT | |
RED | |
GREEN | |
YELLOW | |
BLUE | |
CYAN | |
WHITE | |
PURPLE | |
NUM |
Definition at line 244 of file Symbolizer.h.
Enumerator | |
---|---|
NO_FILE_AND_LINE | |
TERSE | |
COLOR | |
COLOR_IF_TTY | |
NO_FRAME_ADDRESS |
Definition at line 226 of file Symbolizer.h.
|
inlinevirtual |
Definition at line 224 of file Symbolizer.h.
|
inlineexplicitprotected |
Definition at line 248 of file Symbolizer.h.
void folly::symbolizer::SymbolizePrinter::color | ( | SymbolizePrinter::Color | color | ) |
Definition at line 274 of file Symbolizer.cpp.
|
privatepure virtual |
|
inlinevirtual |
If output buffered inside this class, send it to the output stream, so that any output done in other ways appears after this.
Reimplemented in folly::symbolizer::FDSymbolizePrinter.
Definition at line 222 of file Symbolizer.h.
void folly::symbolizer::SymbolizePrinter::print | ( | uintptr_t | address, |
const SymbolizedFrame & | frame | ||
) |
Print one address, no ending newline.
Definition at line 208 of file Symbolizer.cpp.
References folly::demangle(), folly::symbolizer::Dwarf::LocationInfo::file, folly::symbolizer::AddressFormatter::format(), folly::symbolizer::SymbolizedFrame::found, folly::symbolizer::Dwarf::LocationInfo::hasFileAndLine, folly::symbolizer::Dwarf::LocationInfo::hasMainFile, folly::symbolizer::Dwarf::LocationInfo::line, folly::symbolizer::SymbolizedFrame::location, folly::symbolizer::Dwarf::LocationInfo::mainFile, folly::symbolizer::SymbolizedFrame::name, SCOPE_EXIT, folly::symbolizer::Dwarf::Path::toBuffer(), uint32_t, and folly::uint64ToBufferUnsafe().
|
inline |
Print a string, no endling newline.
Definition at line 203 of file Symbolizer.h.
void folly::symbolizer::SymbolizePrinter::println | ( | uintptr_t | address, |
const SymbolizedFrame & | frame | ||
) |
Print one address with ending newline.
Definition at line 284 of file Symbolizer.cpp.
Referenced by folly::symbolizer::SafeStackTracePrinter::printSymbolizedStackTrace(), folly::SingletonVault::scheduleDestroyInstances(), and verifyStackTraces().
void folly::symbolizer::SymbolizePrinter::println | ( | const uintptr_t * | addresses, |
const SymbolizedFrame * | frames, | ||
size_t | frameCount | ||
) |
Print multiple addresses on separate lines.
Definition at line 313 of file Symbolizer.cpp.
References COLOR_IF_TTY, i, println, and TERSE.
|
inline |
Print multiple addresses on separate lines, skipping the first skip addresses.
Definition at line 212 of file Symbolizer.h.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::FrameArray< N >::frameCount, folly::symbolizer::FrameArray< N >::frames, println, and folly::gen::skip().
|
private |
Definition at line 291 of file Symbolizer.cpp.
References folly::demangle(), folly::test::end(), folly::symbolizer::SymbolizedFrame::found, and folly::symbolizer::SymbolizedFrame::name.
|
protected |
Definition at line 252 of file Symbolizer.h.
|
staticprivate |
Definition at line 258 of file Symbolizer.h.
Referenced by folly::symbolizer::Symbolizer::symbolize().
|
protected |
Definition at line 251 of file Symbolizer.h.