38 OS <<
"Global Data Sections:\n";
39 OS <<
"TYPE FILE OFFSET FILE SIZE\n";
40 OS <<
"=============== ================== ==================\n";
49 assert(GDOrErr &&
"GlobalData::decode() should not fail");
69 OS <<
"Address Table:\n";
70 OS <<
"INDEX OFFSET ";
88 OS <<
" (ADDRESS 64)\n";
89 OS <<
"====== ========================================\n";
94 OS << HEX8(getAddrOffsets<uint8_t>()[
I]);
97 OS << HEX16(getAddrOffsets<uint16_t>()[
I]);
100 OS << HEX32(getAddrOffsets<uint32_t>()[
I]);
103 OS << HEX32(getAddrOffsets<uint64_t>()[
I]);
110 OS <<
"\nAddress Info Offsets:\n";
111 OS <<
"INDEX OFFSET 64 (FILE OFFSET 64)\n";
112 OS <<
"====== ========================================\n";
121 OS <<
"INDEX DIRECTORY BASENAME PATH\n";
122 OS <<
"====== ========== ========== "
123 "========================================\n";
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Lightweight error class with error context and mandatory checking.
StringRef - Represent a constant reference to a string, i.e.
constexpr size_t size() const
size - Get the string size.
constexpr const char * data() const
data - Get a pointer to the start of the string (which may not be null terminated).
uint64_t getNumAddresses() const override
Get the number of addresses in this GSYM file.
GsymReaderV2(std::unique_ptr< MemoryBuffer > Buffer, llvm::endianness Endian)
uint8_t getAddressInfoOffsetSize() const override
Get the address info offset byte size for this GSYM file.
uint8_t getAddressOffsetSize() const override
Get the address offset byte size for this GSYM file.
LLVM_ABI void dump(raw_ostream &OS) override
Dump the entire Gsym data contained in this object.
llvm::Error parseHeaderAndGlobalDataEntries() override
For V2 file layout, see HeaderV2.h.
llvm::Error parseGlobalDataEntries(uint64_t Offset)
Parse GlobalData entries starting at Offset into GlobalDataSections.
std::optional< FileEntry > getFile(uint32_t Index) const
Get the a file entry for the suppplied file index.
bool isLittleEndian() const
llvm::Error parseHeader(const HeaderT *&OutHdr, std::unique_ptr< HeaderT > &OutSwappedHdr)
Parse and validate the header from the beginning of the memory buffer.
GsymDataExtractor AddrInfoOffsetsData
LLVM_ABI std::optional< uint64_t > getAddress(size_t Index) const
Gets an address from the address table.
LLVM_ABI std::optional< uint64_t > getAddressInfoOffset(size_t Index) const
Given an address index, get the offset for the FunctionInfo.
std::unique_ptr< MemoryBuffer > MemBuffer
LLVM_ABI llvm::Expected< FunctionInfo > getFunctionInfoAtIndex(uint64_t AddrIdx) const
Get the full function info given an address index.
LLVM_ABI std::optional< StringRef > getOptionalGlobalDataBytes(GlobalInfoType Type) const
Get the raw bytes for an optional GlobalData section as a StringRef.
This class implements an extremely fast bulk output stream that can only output to a stream.
void dump(raw_ostream &OS, const StringTable &S, uint8_t StringOffsetSize)
LLVM_ABI StringRef getNameForGlobalInfoType(GlobalInfoType Type)
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void logAllUnhandledErrors(Error E, raw_ostream &OS, Twine ErrorBanner={})
Log all errors (if any) in E to OS.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
FormattedNumber format_hex_no_prefix(uint64_t N, unsigned Width, bool Upper=false)
format_hex_no_prefix - Output N as a fixed width hexadecimal.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
GlobalData describes a section of data in a GSYM file by its type, file offset, and size.
static LLVM_ABI llvm::Expected< GlobalData > decode(GsymDataExtractor &GsymData, uint64_t &Offset)
Decode a GlobalData entry from a binary data stream.