#include <folly/debugging/symbolizer/SymbolizePrinter.h>
#include <folly/Demangle.h>
#include <folly/FileUtil.h>
#include <folly/ScopeGuard.h>
#include <folly/io/IOBuf.h>
#include <folly/lang/ToAscii.h>
#ifdef __GLIBCXX__
#include <ext/stdio_filebuf.h>
#include <ext/stdio_sync_filebuf.h>
#endif
namespace folly {
namespace symbolizer {
namespace {
constexpr char kHexChars[] = …;
constexpr auto kAddressColor = …;
constexpr auto kFunctionColor = …;
constexpr auto kFileColor = …;
#ifdef _WIN32
constexpr size_t kPathMax = 4096;
#else
constexpr size_t kPathMax = …;
#endif
}
AddressFormatter::AddressFormatter() { … }
folly::StringPiece AddressFormatter::format(uintptr_t address) { … }
void SymbolizePrinter::print(const SymbolizedFrame& frame) { … }
void SymbolizePrinter::color(SymbolizePrinter::Color color) { … }
void SymbolizePrinter::println(const SymbolizedFrame& frame) { … }
void SymbolizePrinter::printTerse(const SymbolizedFrame& frame) { … }
void SymbolizePrinter::println(
const SymbolizedFrame* frames, size_t frameCount) { … }
namespace {
int getFD(const std::ios& stream) { … }
bool isColorfulTty(int options, int fd) { … }
}
OStreamSymbolizePrinter::OStreamSymbolizePrinter(std::ostream& out, int options)
: … { … }
void OStreamSymbolizePrinter::doPrint(StringPiece sp) { … }
FDSymbolizePrinter::FDSymbolizePrinter(int fd, int options, size_t bufferSize)
: … { … }
FDSymbolizePrinter::~FDSymbolizePrinter() { … }
void FDSymbolizePrinter::doPrint(StringPiece sp) { … }
void FDSymbolizePrinter::flush() { … }
FILESymbolizePrinter::FILESymbolizePrinter(FILE* file, int options)
: … { … }
void FILESymbolizePrinter::doPrint(StringPiece sp) { … }
void StringSymbolizePrinter::doPrint(StringPiece sp) { … }
}
}