proxygen
folly::symbolizer::StringSymbolizePrinter Class Reference

#include <Symbolizer.h>

Inheritance diagram for folly::symbolizer::StringSymbolizePrinter:
folly::symbolizer::SymbolizePrinter

Public Member Functions

 StringSymbolizePrinter (int options=0)
 
std::string str () const
 
const fbstringfbstr () const
 
fbstring moveFbString ()
 
- Public Member Functions inherited from folly::symbolizer::SymbolizePrinter
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)
 

Private Member Functions

void doPrint (StringPiece sp) override
 

Private Attributes

fbstring buf_
 

Additional Inherited Members

- Public Types inherited from folly::symbolizer::SymbolizePrinter
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
}
 
- Protected Member Functions inherited from folly::symbolizer::SymbolizePrinter
 SymbolizePrinter (int options, bool isTty=false)
 
- Protected Attributes inherited from folly::symbolizer::SymbolizePrinter
const int options_
 
const bool isTty_
 

Detailed Description

Print a list of symbolized addresses to a std::string. Not reentrant. Do not use from signal handling code.

Definition at line 317 of file Symbolizer.h.

Constructor & Destructor Documentation

folly::symbolizer::StringSymbolizePrinter::StringSymbolizePrinter ( int  options = 0)
inlineexplicit

Definition at line 319 of file Symbolizer.h.

320  : SymbolizePrinter(options) {}
SymbolizePrinter(int options, bool isTty=false)
Definition: Symbolizer.h:248

Member Function Documentation

void folly::symbolizer::StringSymbolizePrinter::doPrint ( StringPiece  sp)
overrideprivatevirtual

Implements folly::symbolizer::SymbolizePrinter.

Definition at line 405 of file Symbolizer.cpp.

References folly::Range< Iter >::data(), and folly::Range< Iter >::size().

405  {
406  buf_.append(sp.data(), sp.size());
407 }
basic_fbstring & append(const basic_fbstring &str)
Definition: FBString.h:1953
const fbstring& folly::symbolizer::StringSymbolizePrinter::fbstr ( ) const
inline

Definition at line 325 of file Symbolizer.h.

325  {
326  return buf_;
327  }
fbstring folly::symbolizer::StringSymbolizePrinter::moveFbString ( )
inline

Definition at line 328 of file Symbolizer.h.

References folly::gen::move.

328  {
329  return std::move(buf_);
330  }
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
std::string folly::symbolizer::StringSymbolizePrinter::str ( ) const
inline

Definition at line 322 of file Symbolizer.h.

Referenced by folly::SingletonVault::scheduleDestroyInstances().

322  {
323  return buf_.toStdString();
324  }
std::basic_string< E, T, A > toStdString() const
Definition: FBString.h:1227

Member Data Documentation

fbstring folly::symbolizer::StringSymbolizePrinter::buf_
private

Definition at line 334 of file Symbolizer.h.


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