#include "llvm/DebugInfo/Symbolize/SymbolizableObjectFile.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/BinaryFormat/COFF.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/Object/COFF.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Object/SymbolSize.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/TargetParser/Triple.h"
#include <algorithm>
usingnamespacellvm;
usingnamespaceobject;
usingnamespacesymbolize;
Expected<std::unique_ptr<SymbolizableObjectFile>>
SymbolizableObjectFile::create(const object::ObjectFile *Obj,
std::unique_ptr<DIContext> DICtx,
bool UntagAddresses) { … }
SymbolizableObjectFile::SymbolizableObjectFile(const ObjectFile *Obj,
std::unique_ptr<DIContext> DICtx,
bool UntagAddresses)
: … { … }
namespace {
struct OffsetNamePair { … };
}
Error SymbolizableObjectFile::addCoffExportSymbols(
const COFFObjectFile *CoffObj) { … }
Error SymbolizableObjectFile::addSymbol(const SymbolRef &Symbol,
uint64_t SymbolSize,
DataExtractor *OpdExtractor,
uint64_t OpdAddress) { … }
bool SymbolizableObjectFile::isWin32Module() const { … }
uint64_t SymbolizableObjectFile::getModulePreferredBase() const { … }
bool SymbolizableObjectFile::getNameFromSymbolTable(
uint64_t Address, std::string &Name, uint64_t &Addr, uint64_t &Size,
std::string &FileName) const { … }
bool SymbolizableObjectFile::shouldOverrideWithSymbolTable(
FunctionNameKind FNKind, bool UseSymbolTable) const { … }
DILineInfo
SymbolizableObjectFile::symbolizeCode(object::SectionedAddress ModuleOffset,
DILineInfoSpecifier LineInfoSpecifier,
bool UseSymbolTable) const { … }
DIInliningInfo SymbolizableObjectFile::symbolizeInlinedCode(
object::SectionedAddress ModuleOffset,
DILineInfoSpecifier LineInfoSpecifier, bool UseSymbolTable) const { … }
DIGlobal SymbolizableObjectFile::symbolizeData(
object::SectionedAddress ModuleOffset) const { … }
std::vector<DILocal> SymbolizableObjectFile::symbolizeFrame(
object::SectionedAddress ModuleOffset) const { … }
std::vector<object::SectionedAddress>
SymbolizableObjectFile::findSymbol(StringRef Symbol, uint64_t Offset) const { … }
uint64_t SymbolizableObjectFile::getModuleSectionIndexForAddress(
uint64_t Address) const { … }