Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
bloaty Namespace Reference

Namespaces

 dwarf
 
 macho
 
 pe
 
 wasm
 

Classes

class  ArgParser
 
class  Bloaty
 
struct  ConfiguredDataSource
 
struct  DataSourceDefinition
 
struct  DisassemblyInfo
 
struct  DualMap
 
struct  DualMaps
 
class  Error
 
class  FileDescriptor
 
struct  GeneralDIE
 
class  InputFile
 
class  InputFileFactory
 
class  MmapInputFile
 
class  MmapInputFileFactory
 
class  NameMunger
 
class  ObjectFile
 
struct  OutputOptions
 
class  RangeMap
 
class  RangeMapTest
 
class  RangeSink
 
class  ReImpl
 
class  Rollup
 
struct  RollupOutput
 
struct  RollupRow
 
class  StringPieceInputFile
 
class  StringPieceInputFileFactory
 
class  ThreadSafeIterIndex
 

Typedefs

typedef std::map< absl::string_view, std::pair< uint64_t, uint64_t > > SymbolTable
 

Enumerations

enum  DataSource {
  DataSource::kArchiveMembers, DataSource::kCompileUnits, DataSource::kInlines, DataSource::kInputFiles,
  DataSource::kRawRanges, DataSource::kSections, DataSource::kSegments, DataSource::kSymbols,
  DataSource::kRawSymbols, DataSource::kFullSymbols, DataSource::kShortSymbols
}
 
enum  Endian { Endian::kBig, Endian::kLittle }
 
enum  OutputFormat { OutputFormat::kPrettyPrint, OutputFormat::kCSV, OutputFormat::kTSV }
 
enum  ShowDomain { ShowDomain::kShowFile, ShowDomain::kShowVM, ShowDomain::kShowBoth }
 

Functions

char * __cxa_demangle (const char *mangled_name, char *buf, size_t *n, int *status)
 
template<size_t N, class T >
constexpr T _BS (T val)
 
void AddDIE (const dwarf::CU &cu, const GeneralDIE &die, const DualMap &symbol_map, RangeSink *sink)
 
size_t AlignUp (size_t offset, size_t granularity)
 
void BloatyDoMain (const Options &options, const InputFileFactory &file_factory, RollupOutput *output)
 
bool BloatyMain (const Options &options, const InputFileFactory &file_factory, RollupOutput *output, std::string *error)
 
template<class T >
constexpr T ByteSwap (T val)
 
void CheckedAdd (int64_t *accum, int64_t val)
 
uint64_t CheckedAdd (uint64_t a, uint64_t b)
 
uint64_t CheckedMul (uint64_t a, uint64_t b)
 
static std::string CSVEscape (string_view str)
 
void DisassembleFindReferences (const DisassemblyInfo &info, RangeSink *sink)
 
std::string DisassembleFunction (const DisassemblyInfo &info)
 
bool DoParseOptions (bool skip_unknown, int *argc, char **argv[], Options *options, OutputOptions *output_options)
 
const char * GetDataSourceLabel (DataSource source)
 
Endian GetMachineEndian ()
 
std::string ItaniumDemangle (string_view symbol, DataSource source)
 
static std::string LineInfoKey (const std::string &file, uint32_t line, bool include_line)
 
bool ParseOptions (bool skip_unknown, int *argc, char **argv[], Options *options, OutputOptions *output_options, std::string *error)
 
template<class T >
T ReadBigEndian (absl::string_view *data)
 
absl::string_view ReadBytes (size_t bytes, absl::string_view *data)
 
static bool ReadDWARFAddressRanges (const dwarf::File &file, RangeSink *sink)
 
void ReadDWARFCompileUnits (const dwarf::File &file, const DualMap &map, RangeSink *sink)
 
static void ReadDWARFDebugInfo (dwarf::InfoReader &reader, dwarf::InfoReader::Section section, const DualMap &symbol_map, RangeSink *sink)
 
void ReadDWARFInlines (const dwarf::File &file, RangeSink *sink, bool include_line)
 
static void ReadDWARFPubNames (dwarf::InfoReader &reader, string_view section, RangeSink *sink)
 
static void ReadDWARFStmtList (bool include_line, dwarf::LineInfoReader *line_info_reader, RangeSink *sink)
 
static void ReadDWARFStmtListRange (const dwarf::CU &cu, uint64_t offset, RangeSink *sink)
 
void ReadEhFrame (absl::string_view contents, RangeSink *sink)
 
void ReadEhFrameHdr (absl::string_view contents, RangeSink *sink)
 
uint64_t ReadEncodedPointer (uint8_t encoding, bool is_64bit, string_view *data, const char *data_base, RangeSink *sink)
 
template<class T >
T ReadEndian (absl::string_view *data, Endian endian)
 
template<class T , size_t N = sizeof(T)>
T ReadFixed (absl::string_view *data)
 
void ReadGeneralDIEAttr (uint16_t tag, dwarf::AttrValue val, const dwarf::CU &cu, GeneralDIE *die)
 
template<class T >
T ReadLittleEndian (absl::string_view *data)
 
absl::string_view ReadNullTerminated (absl::string_view *data)
 
void RunBloaty (const InputFileFactory &factory, const std::string &data_source)
 
int SignOf (long val)
 
void SkipBytes (size_t bytes, absl::string_view *data)
 
absl::string_view StrictSubstr (absl::string_view data, size_t off)
 
absl::string_view StrictSubstr (absl::string_view data, size_t off, size_t n)
 
 TEST_F (RangeMapTest, AddRange)
 
 TEST_F (RangeMapTest, Bug1)
 
 TEST_F (RangeMapTest, Bug2)
 
 TEST_F (RangeMapTest, Bug3)
 
 TEST_F (RangeMapTest, GetLabel)
 
 TEST_F (RangeMapTest, Translation)
 
 TEST_F (RangeMapTest, Translation2)
 
 TEST_F (RangeMapTest, UnknownSize)
 
 TEST_F (RangeMapTest, UnknownSize2)
 
 TEST_F (RangeMapTest, UnknownSize3)
 
 TEST_F (RangeMapTest, UnknownSize4)
 
 TEST_F (RangeMapTest, UnknownTranslation)
 
ABSL_ATTRIBUTE_NORETURN void Throw (const char *str, int line)
 
bool TryGetJumpTarget (cs_arch arch, cs_insn *in, uint64_t *target)
 
std::unique_ptr< ObjectFileTryOpenELFFile (std::unique_ptr< InputFile > &file)
 
std::unique_ptr< ObjectFileTryOpenMachOFile (std::unique_ptr< InputFile > &file)
 
std::unique_ptr< ObjectFileTryOpenPEFile (std::unique_ptr< InputFile > &file)
 
std::unique_ptr< ObjectFileTryOpenWebAssemblyFile (std::unique_ptr< InputFile > &file)
 
uint64_t TryReadPcPair (const dwarf::CU &cu, const GeneralDIE &die, RangeSink *sink)
 

Variables

constexpr DataSourceDefinition data_sources []
 
uint64_t debug_fileoff = -1
 
uint64_t debug_vmaddr = -1
 
std::string others_label = "[Other]"
 
ShowDomain show = ShowDomain::kShowBoth
 
const char usage []
 
int verbose_level = 0
 

Typedef Documentation

◆ SymbolTable

Definition at line 253 of file bloaty.h.

Enumeration Type Documentation

◆ DataSource

enum bloaty::DataSource
strong
Enumerator
kArchiveMembers 
kCompileUnits 
kInlines 
kInputFiles 
kRawRanges 
kSections 
kSegments 
kSymbols 
kRawSymbols 
kFullSymbols 
kShortSymbols 

Definition at line 52 of file bloaty.h.

◆ Endian

enum bloaty::Endian
strong
Enumerator
kBig 
kLittle 

Definition at line 113 of file bloaty/src/util.h.

◆ OutputFormat

enum bloaty::OutputFormat
strong
Enumerator
kPrettyPrint 
kCSV 
kTSV 

Definition at line 358 of file bloaty.h.

◆ ShowDomain

enum bloaty::ShowDomain
strong
Enumerator
kShowFile 
kShowVM 
kShowBoth 

Definition at line 364 of file bloaty.h.

Function Documentation

◆ __cxa_demangle()

char* bloaty::__cxa_demangle ( const char *  mangled_name,
char *  buf,
size_t *  n,
int status 
)

Definition at line 4927 of file cxa_demangle.cpp.

◆ _BS()

template<size_t N, class T >
constexpr T bloaty::_BS ( T  val)
constexpr

Definition at line 123 of file bloaty/src/util.h.

◆ AddDIE()

void bloaty::AddDIE ( const dwarf::CU cu,
const GeneralDIE die,
const DualMap symbol_map,
RangeSink sink 
)

Definition at line 405 of file dwarf.cc.

◆ AlignUp()

size_t bloaty::AlignUp ( size_t  offset,
size_t  granularity 
)
inline

Definition at line 105 of file bloaty/src/util.h.

◆ BloatyDoMain()

void bloaty::BloatyDoMain ( const Options &  options,
const InputFileFactory file_factory,
RollupOutput output 
)

Definition at line 2148 of file bloaty.cc.

◆ BloatyMain()

bool bloaty::BloatyMain ( const Options &  options,
const InputFileFactory file_factory,
RollupOutput output,
std::string *  error 
)

Definition at line 2196 of file bloaty.cc.

◆ ByteSwap()

template<class T >
constexpr T bloaty::ByteSwap ( T  val)
constexpr

Definition at line 133 of file bloaty/src/util.h.

◆ CheckedAdd() [1/2]

void bloaty::CheckedAdd ( int64_t accum,
int64_t  val 
)

Definition at line 124 of file bloaty.cc.

◆ CheckedAdd() [2/2]

uint64_t bloaty::CheckedAdd ( uint64_t  a,
uint64_t  b 
)
inline

Definition at line 71 of file bloaty/src/util.h.

◆ CheckedMul()

uint64_t bloaty::CheckedMul ( uint64_t  a,
uint64_t  b 
)
inline

Definition at line 80 of file bloaty/src/util.h.

◆ CSVEscape()

static std::string bloaty::CSVEscape ( string_view  str)
static

Definition at line 140 of file bloaty.cc.

◆ DisassembleFindReferences()

void bloaty::DisassembleFindReferences ( const DisassemblyInfo info,
RangeSink sink 
)

Definition at line 43 of file disassemble.cc.

◆ DisassembleFunction()

std::string bloaty::DisassembleFunction ( const DisassemblyInfo info)

Definition at line 135 of file disassemble.cc.

◆ DoParseOptions()

bool bloaty::DoParseOptions ( bool  skip_unknown,
int argc,
char **  argv[],
Options *  options,
OutputOptions output_options 
)

Definition at line 1990 of file bloaty.cc.

◆ GetDataSourceLabel()

const char* bloaty::GetDataSourceLabel ( DataSource  source)

Definition at line 103 of file bloaty.cc.

◆ GetMachineEndian()

Endian bloaty::GetMachineEndian ( )
inline

Definition at line 115 of file bloaty/src/util.h.

◆ ItaniumDemangle()

std::string bloaty::ItaniumDemangle ( string_view  symbol,
DataSource  source 
)

Definition at line 169 of file bloaty.cc.

◆ LineInfoKey()

static std::string bloaty::LineInfoKey ( const std::string &  file,
uint32_t  line,
bool  include_line 
)
static

Definition at line 651 of file dwarf.cc.

◆ ParseOptions()

bool bloaty::ParseOptions ( bool  skip_unknown,
int argc,
char **  argv[],
Options *  options,
OutputOptions output_options,
std::string *  error 
)

Definition at line 2138 of file bloaty.cc.

◆ ReadBigEndian()

template<class T >
T bloaty::ReadBigEndian ( absl::string_view data)

Definition at line 157 of file bloaty/src/util.h.

◆ ReadBytes()

absl::string_view bloaty::ReadBytes ( size_t  bytes,
absl::string_view data 
)
inline

Definition at line 165 of file bloaty/src/util.h.

◆ ReadDWARFAddressRanges()

static bool bloaty::ReadDWARFAddressRanges ( const dwarf::File file,
RangeSink sink 
)
static

Definition at line 237 of file dwarf.cc.

◆ ReadDWARFCompileUnits()

void bloaty::ReadDWARFCompileUnits ( const dwarf::File file,
const DualMap map,
RangeSink sink 
)

Definition at line 630 of file dwarf.cc.

◆ ReadDWARFDebugInfo()

static void bloaty::ReadDWARFDebugInfo ( dwarf::InfoReader reader,
dwarf::InfoReader::Section  section,
const DualMap symbol_map,
RangeSink sink 
)
static

Definition at line 579 of file dwarf.cc.

◆ ReadDWARFInlines()

void bloaty::ReadDWARFInlines ( const dwarf::File file,
RangeSink sink,
bool  include_line 
)

Definition at line 691 of file dwarf.cc.

◆ ReadDWARFPubNames()

static void bloaty::ReadDWARFPubNames ( dwarf::InfoReader reader,
string_view  section,
RangeSink sink 
)
static

Definition at line 542 of file dwarf.cc.

◆ ReadDWARFStmtList()

static void bloaty::ReadDWARFStmtList ( bool  include_line,
dwarf::LineInfoReader line_info_reader,
RangeSink sink 
)
static

Definition at line 660 of file dwarf.cc.

◆ ReadDWARFStmtListRange()

static void bloaty::ReadDWARFStmtListRange ( const dwarf::CU cu,
uint64_t  offset,
RangeSink sink 
)
static

Definition at line 564 of file dwarf.cc.

◆ ReadEhFrame()

void bloaty::ReadEhFrame ( absl::string_view  contents,
RangeSink sink 
)

Definition at line 125 of file eh_frame.cc.

◆ ReadEhFrameHdr()

void bloaty::ReadEhFrameHdr ( absl::string_view  contents,
RangeSink sink 
)

Definition at line 230 of file eh_frame.cc.

◆ ReadEncodedPointer()

uint64_t bloaty::ReadEncodedPointer ( uint8_t  encoding,
bool  is_64bit,
string_view data,
const char *  data_base,
RangeSink sink 
)

Definition at line 26 of file eh_frame.cc.

◆ ReadEndian()

template<class T >
T bloaty::ReadEndian ( absl::string_view data,
Endian  endian 
)

Definition at line 148 of file bloaty/src/util.h.

◆ ReadFixed()

template<class T , size_t N = sizeof(T)>
T bloaty::ReadFixed ( absl::string_view data)

Definition at line 137 of file bloaty/src/util.h.

◆ ReadGeneralDIEAttr()

void bloaty::ReadGeneralDIEAttr ( uint16_t  tag,
dwarf::AttrValue  val,
const dwarf::CU cu,
GeneralDIE die 
)

Definition at line 311 of file dwarf.cc.

◆ ReadLittleEndian()

template<class T >
T bloaty::ReadLittleEndian ( absl::string_view data)

Definition at line 153 of file bloaty/src/util.h.

◆ ReadNullTerminated()

absl::string_view bloaty::ReadNullTerminated ( absl::string_view data)

Definition at line 26 of file third_party/bloaty/src/util.cc.

◆ RunBloaty()

void bloaty::RunBloaty ( const InputFileFactory factory,
const std::string &  data_source 
)

Definition at line 44 of file fuzz_target.cc.

◆ SignOf()

int bloaty::SignOf ( long  val)

Definition at line 114 of file bloaty.cc.

◆ SkipBytes()

void bloaty::SkipBytes ( size_t  bytes,
absl::string_view data 
)
inline

Definition at line 174 of file bloaty/src/util.h.

◆ StrictSubstr() [1/2]

absl::string_view bloaty::StrictSubstr ( absl::string_view  data,
size_t  off 
)
inline

Definition at line 98 of file bloaty/src/util.h.

◆ StrictSubstr() [2/2]

absl::string_view bloaty::StrictSubstr ( absl::string_view  data,
size_t  off,
size_t  n 
)
inline

Definition at line 89 of file bloaty/src/util.h.

◆ TEST_F() [1/12]

bloaty::TEST_F ( RangeMapTest  ,
AddRange   
)

Definition at line 110 of file range_map_test.cc.

◆ TEST_F() [2/12]

bloaty::TEST_F ( RangeMapTest  ,
Bug1   
)

Definition at line 248 of file range_map_test.cc.

◆ TEST_F() [3/12]

bloaty::TEST_F ( RangeMapTest  ,
Bug2   
)

Definition at line 258 of file range_map_test.cc.

◆ TEST_F() [4/12]

bloaty::TEST_F ( RangeMapTest  ,
Bug3   
)

Definition at line 269 of file range_map_test.cc.

◆ TEST_F() [5/12]

bloaty::TEST_F ( RangeMapTest  ,
GetLabel   
)

Definition at line 280 of file range_map_test.cc.

◆ TEST_F() [6/12]

bloaty::TEST_F ( RangeMapTest  ,
Translation   
)

Definition at line 309 of file range_map_test.cc.

◆ TEST_F() [7/12]

bloaty::TEST_F ( RangeMapTest  ,
Translation2   
)

Definition at line 352 of file range_map_test.cc.

◆ TEST_F() [8/12]

bloaty::TEST_F ( RangeMapTest  ,
UnknownSize   
)

Definition at line 186 of file range_map_test.cc.

◆ TEST_F() [9/12]

bloaty::TEST_F ( RangeMapTest  ,
UnknownSize2   
)

Definition at line 212 of file range_map_test.cc.

◆ TEST_F() [10/12]

bloaty::TEST_F ( RangeMapTest  ,
UnknownSize3   
)

Definition at line 224 of file range_map_test.cc.

◆ TEST_F() [11/12]

bloaty::TEST_F ( RangeMapTest  ,
UnknownSize4   
)

Definition at line 236 of file range_map_test.cc.

◆ TEST_F() [12/12]

bloaty::TEST_F ( RangeMapTest  ,
UnknownTranslation   
)

Definition at line 379 of file range_map_test.cc.

◆ Throw()

ABSL_ATTRIBUTE_NORETURN void bloaty::Throw ( const char *  str,
int  line 
)

Definition at line 22 of file third_party/bloaty/src/util.cc.

◆ TryGetJumpTarget()

bool bloaty::TryGetJumpTarget ( cs_arch  arch,
cs_insn *  in,
uint64_t target 
)

Definition at line 96 of file disassemble.cc.

◆ TryOpenELFFile()

std::unique_ptr< ObjectFile > bloaty::TryOpenELFFile ( std::unique_ptr< InputFile > &  file)

Definition at line 1403 of file elf.cc.

◆ TryOpenMachOFile()

std::unique_ptr< ObjectFile > bloaty::TryOpenMachOFile ( std::unique_ptr< InputFile > &  file)

Definition at line 610 of file macho.cc.

◆ TryOpenPEFile()

std::unique_ptr< ObjectFile > bloaty::TryOpenPEFile ( std::unique_ptr< InputFile > &  file)

Definition at line 276 of file pe.cc.

◆ TryOpenWebAssemblyFile()

std::unique_ptr< ObjectFile > bloaty::TryOpenWebAssemblyFile ( std::unique_ptr< InputFile > &  file)

Definition at line 380 of file webassembly.cc.

◆ TryReadPcPair()

uint64_t bloaty::TryReadPcPair ( const dwarf::CU cu,
const GeneralDIE die,
RangeSink sink 
)

Definition at line 383 of file dwarf.cc.

Variable Documentation

◆ data_sources

constexpr DataSourceDefinition bloaty::data_sources[]
constexpr
Initial value:
= {
{DataSource::kArchiveMembers, "armembers", "the .o files in a .a file"},
{DataSource::kCompileUnits, "compileunits",
"source file for the .o file (translation unit). requires debug info."},
{DataSource::kInputFiles, "inputfiles",
"the filename specified on the Bloaty command-line"},
{DataSource::kInlines, "inlines",
"source line/file where inlined code came from. requires debug info."},
{DataSource::kSections, "sections", "object file section"},
{DataSource::kSegments, "segments", "load commands in the binary"},
{DataSource::kSymbols, "symbols",
"symbols from symbol table (configure demangling with --demangle)"},
{DataSource::kRawSymbols, "rawsymbols", "unmangled symbols"},
{DataSource::kFullSymbols, "fullsymbols", "full demangled symbols"},
{DataSource::kShortSymbols, "shortsymbols", "short demangled symbols"},
}

Definition at line 83 of file bloaty.cc.

◆ debug_fileoff

uint64_t bloaty::debug_fileoff = -1

Definition at line 1008 of file bloaty.cc.

◆ debug_vmaddr

uint64_t bloaty::debug_vmaddr = -1

Definition at line 1007 of file bloaty.cc.

◆ others_label

std::string bloaty::others_label = "[Other]"

Definition at line 251 of file bloaty.cc.

◆ show

Definition at line 75 of file bloaty.cc.

◆ usage

const char bloaty::usage[]

Definition at line 1843 of file bloaty.cc.

◆ verbose_level

int bloaty::verbose_level = 0

Definition at line 74 of file bloaty.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:02:58