proxygen
folly::symbolizer::FILESymbolizePrinter Class Reference

#include <Symbolizer.h>

Inheritance diagram for folly::symbolizer::FILESymbolizePrinter:
folly::symbolizer::SymbolizePrinter

Public Member Functions

 FILESymbolizePrinter (FILE *file, int options=0)
 
- 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

FILE *const file_ = nullptr
 

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 FILE*. Ignores errors. Not reentrant. Do not use from signal handling code.

Definition at line 304 of file Symbolizer.h.

Constructor & Destructor Documentation

folly::symbolizer::FILESymbolizePrinter::FILESymbolizePrinter ( FILE file,
int  options = 0 
)
explicit

Definition at line 397 of file Symbolizer.cpp.

398  : SymbolizePrinter(options, isColorfulTty(options, fileno(file))),
399  file_(file) {}
SymbolizePrinter(int options, bool isTty=false)
Definition: Symbolizer.h:248

Member Function Documentation

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

Implements folly::symbolizer::SymbolizePrinter.

Definition at line 401 of file Symbolizer.cpp.

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

401  {
402  fwrite(sp.data(), 1, sp.size(), file_);
403 }

Member Data Documentation

FILE* const folly::symbolizer::FILESymbolizePrinter::file_ = nullptr
private

Definition at line 310 of file Symbolizer.h.

Referenced by doPrint().


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