LLVM 20.0.0git
|
Classes | |
struct | CallSiteInfo |
struct | CallSiteInfoCollection |
class | CallSiteInfoLoader |
struct | CUInfo |
class | DwarfTransformer |
A class that transforms the DWARF in a DWARFContext into GSYM information by populating the GsymCreator object that it is constructed with. More... | |
struct | FileEntry |
Files in GSYM are contained in FileEntry structs where we split the directory and basename into two different strings in the string table. More... | |
class | FileWriter |
A simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process. More... | |
struct | FunctionInfo |
Function information in GSYM files encodes information for one contiguous address range. More... | |
class | GsymCreator |
GsymCreator is used to emit GSYM data to a stand alone file or section within a file. More... | |
class | GsymReader |
GsymReader is used to read GSYM data from a file or buffer. More... | |
struct | Header |
The GSYM header. More... | |
struct | InlineInfo |
Inline information stores the name of the inline function along with an array of address ranges. More... | |
struct | LineEntry |
Line entries are used to encode the line tables in FunctionInfo objects. More... | |
class | LineTable |
LineTable class contains deserialized versions of line tables for each function's address ranges. More... | |
struct | LookupResult |
struct | MergedFunctionsInfo |
class | ObjectFileTransformer |
class | OutputAggregator |
struct | SourceLocation |
struct | StringTable |
String tables in GSYM files are required to start with an empty string at offset zero. More... | |
Typedefs | |
using | SourceLocations = std::vector< SourceLocation > |
Variables | |
constexpr uint32_t | GSYM_MAGIC = 0x4753594d |
constexpr uint32_t | GSYM_CIGAM = 0x4d595347 |
constexpr uint32_t | GSYM_VERSION = 1 |
constexpr size_t | GSYM_MAX_UUID_SIZE = 20 |
using llvm::gsym::SourceLocations = typedef std::vector<SourceLocation> |
Definition at line 36 of file LookupResult.h.
AddressRange llvm::gsym::decodeRange | ( | DataExtractor & | Data, |
uint64_t | BaseAddr, | ||
uint64_t & | Offset | ||
) |
AddressRange objects are encoded and decoded to be relative to a base address.
This will be the FunctionInfo's start address if the AddressRange is directly contained in a FunctionInfo, or a base address of the containing parent AddressRange or AddressRanges. This allows address ranges to be efficiently encoded using ULEB128 encodings as we encode the offset and size of each range instead of full addresses. This also makes encoded addresses easy to relocate as we just need to relocate one base address.
Definition at line 23 of file ExtractRanges.cpp.
References llvm::Data, llvm::Offset, and Size.
Referenced by decodeRanges().
void llvm::gsym::decodeRanges | ( | AddressRanges & | Ranges, |
DataExtractor & | Data, | ||
uint64_t | BaseAddr, | ||
uint64_t & | Offset | ||
) |
Address ranges are decoded and encoded to be relative to a base address.
See the AddressRange comment for the encode and decode methods for full details.
Definition at line 41 of file ExtractRanges.cpp.
References llvm::Data, decodeRange(), and llvm::Offset.
void llvm::gsym::encodeRange | ( | const AddressRange & | Range, |
FileWriter & | O, | ||
uint64_t | BaseAddr | ||
) |
Definition at line 17 of file ExtractRanges.cpp.
References assert(), and Range.
Referenced by encodeRanges().
void llvm::gsym::encodeRanges | ( | const AddressRanges & | Ranges, |
FileWriter & | O, | ||
uint64_t | BaseAddr | ||
) |
Definition at line 32 of file ExtractRanges.cpp.
References encodeRange(), and Range.
Referenced by llvm::gsym::InlineInfo::encode().
|
inline |
Definition at line 214 of file FunctionInfo.h.
Definition at line 39 of file LineEntry.h.
|
inline |
This sorting will order things consistently by address range first, but then followed by increasing levels of debug info like inline information and line tables.
We might end up with a FunctionInfo from debug info that will have the same range as one from the symbol table, but we want to quickly be able to sort and use the best version when creating the final GSYM file. This function compares the inline information as we have seen cases where LTO can generate a wide array of differing inline information, mostly due to messing up the address ranges for inlined functions, so the inline information with the most entries will appeear last. If the inline information match, either by both function infos not having any or both being exactly the same, we will then compare line tables. Comparing line tables allows the entry with the most line entries to appear last. This ensures we are able to save the FunctionInfo with the most debug info into the GSYM file.
Definition at line 231 of file FunctionInfo.h.
Definition at line 42 of file LineEntry.h.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const CallSiteInfo & | CSI | ||
) |
Definition at line 234 of file CallSiteInfo.cpp.
References HEX64, HEX8, llvm::gsym::CallSiteInfo::MatchRegex, OS, and llvm::gsym::CallSiteInfo::ReturnOffset.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const CallSiteInfoCollection & | CSIC | ||
) |
Definition at line 247 of file CallSiteInfo.cpp.
References llvm::gsym::CallSiteInfoCollection::CallSites, and OS.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const FunctionInfo & | R | ||
) |
Definition at line 30 of file FunctionInfo.cpp.
References llvm::gsym::FunctionInfo::CallSites, HEX32, llvm::gsym::FunctionInfo::Inline, llvm::gsym::FunctionInfo::Name, llvm::gsym::FunctionInfo::OptLineTable, OS, and llvm::gsym::FunctionInfo::Range.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const gsym::LineTable & | LT | ||
) |
Definition at line 284 of file LineTable.cpp.
References OS.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const InlineInfo & | FI | ||
) |
Definition at line 20 of file InlineInfo.cpp.
References llvm::First, HEX32, II, OS, and Range.
|
inline |
Definition at line 31 of file LineEntry.h.
References llvm::format(), HEX64, and OS.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const llvm::gsym::Header & | H | ||
) |
Definition at line 23 of file Header.cpp.
References llvm::format_hex_no_prefix(), H, HEX16, HEX32, HEX64, HEX8, I, and OS.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const LookupResult & | R | ||
) |
Definition at line 58 of file LookupResult.cpp.
References HEX64, I, llvm::raw_ostream::indent(), llvm::gsym::LookupResult::Locations, llvm::gsym::LookupResult::LookupAddr, and OS.
raw_ostream & llvm::gsym::operator<< | ( | raw_ostream & | OS, |
const SourceLocation & | R | ||
) |
Definition at line 36 of file LookupResult.cpp.
References llvm::gsym::SourceLocation::Base, llvm::StringRef::contains(), llvm::gsym::SourceLocation::Dir, llvm::StringRef::empty(), llvm::gsym::SourceLocation::Line, llvm::gsym::SourceLocation::Name, llvm::gsym::SourceLocation::Offset, OS, and llvm::StringRef::size().
|
inline |
Definition at line 36 of file StringTable.h.
References llvm::gsym::StringTable::Data, llvm::gsym::StringTable::getString(), HEX32, llvm::Offset, OS, llvm::StringRef::size(), and Size.
|
inline |
Definition at line 210 of file FunctionInfo.h.
References LHS, llvm::operator==(), and RHS.
Definition at line 101 of file Header.cpp.
|
inline |
Definition at line 180 of file InlineInfo.h.
References LHS, llvm::operator==(), and RHS.
Definition at line 36 of file LineEntry.h.
References LHS, llvm::operator==(), and RHS.
|
inline |
Definition at line 55 of file LookupResult.h.
References LHS, llvm::operator==(), and RHS.
bool llvm::gsym::operator== | ( | const MergedFunctionsInfo & | LHS, |
const MergedFunctionsInfo & | RHS | ||
) |
References llvm::operator==().
|
inline |
Definition at line 29 of file LookupResult.h.
References LHS, llvm::operator==(), and RHS.
void llvm::gsym::skipRange | ( | DataExtractor & | Data, |
uint64_t & | Offset | ||
) |
Skip an address range object in the specified data a the specified offset.
Data | The binary stream to read the data from. |
Offset | The byte offset within Data. |
Definition at line 50 of file ExtractRanges.cpp.
References llvm::Data, and llvm::Offset.
Referenced by skipRanges().
uint64_t llvm::gsym::skipRanges | ( | DataExtractor & | Data, |
uint64_t & | Offset | ||
) |
Skip an address range object in the specified data a the specified offset.
Data | The binary stream to read the data from. |
Offset | The byte offset within Data. |
Definition at line 55 of file ExtractRanges.cpp.
References llvm::Data, I, llvm::Offset, and skipRange().
Referenced by skip().
|
constexpr |
|
constexpr |
Definition at line 24 of file Header.h.
Referenced by llvm::gsym::Header::checkForError(), and llvm::gsym::GsymCreator::encode().
|
constexpr |
Definition at line 27 of file Header.h.
Referenced by llvm::gsym::Header::checkForError(), and llvm::gsym::Header::decode().
|
constexpr |
Definition at line 26 of file Header.h.
Referenced by llvm::gsym::Header::checkForError(), and llvm::gsym::GsymCreator::encode().