|
LLVM
10.0.0
|
#include "llvm/DebugInfo/DWARF/DWARFContext.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallString.h"#include "llvm/ADT/SmallVector.h"#include "llvm/ADT/StringRef.h"#include "llvm/ADT/StringSwitch.h"#include "llvm/BinaryFormat/Dwarf.h"#include "llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h"#include "llvm/DebugInfo/DWARF/DWARFCompileUnit.h"#include "llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h"#include "llvm/DebugInfo/DWARF/DWARFDebugAddr.h"#include "llvm/DebugInfo/DWARF/DWARFDebugArangeSet.h"#include "llvm/DebugInfo/DWARF/DWARFDebugAranges.h"#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"#include "llvm/DebugInfo/DWARF/DWARFDebugLine.h"#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"#include "llvm/DebugInfo/DWARF/DWARFDebugMacro.h"#include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h"#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"#include "llvm/DebugInfo/DWARF/DWARFDebugRnglists.h"#include "llvm/DebugInfo/DWARF/DWARFDie.h"#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"#include "llvm/DebugInfo/DWARF/DWARFGdbIndex.h"#include "llvm/DebugInfo/DWARF/DWARFSection.h"#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"#include "llvm/DebugInfo/DWARF/DWARFVerifier.h"#include "llvm/MC/MCRegisterInfo.h"#include "llvm/Object/Decompressor.h"#include "llvm/Object/MachO.h"#include "llvm/Object/ObjectFile.h"#include "llvm/Object/RelocationResolver.h"#include "llvm/Support/Casting.h"#include "llvm/Support/DataExtractor.h"#include "llvm/Support/Error.h"#include "llvm/Support/Format.h"#include "llvm/Support/LEB128.h"#include "llvm/Support/MemoryBuffer.h"#include "llvm/Support/Path.h"#include "llvm/Support/TargetRegistry.h"#include "llvm/Support/WithColor.h"#include "llvm/Support/raw_ostream.h"#include <algorithm>#include <cstdint>#include <deque>#include <map>#include <string>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | SymInfo |
| SymInfo contains information about symbol: it's address and section index which is -1LL for absolute symbols. More... | |
Macros | |
| #define | DEBUG_TYPE "dwarf" |
Typedefs | |
| using | DWARFLineTable = DWARFDebugLine::LineTable |
| using | FileLineInfoKind = DILineInfoSpecifier::FileLineInfoKind |
| using | FunctionNameKind = DILineInfoSpecifier::FunctionNameKind |
| using | ContributionCollection = std::vector< Optional< StrOffsetsContributionDescriptor > > |
Functions | |
| static void | dumpUUID (raw_ostream &OS, const ObjectFile &Obj) |
| Dump the UUID load command. More... | |
| static ContributionCollection | collectContributionData (DWARFContext::unit_iterator_range Units) |
| static void | dumpDWARFv5StringOffsetsSection (raw_ostream &OS, StringRef SectionName, const DWARFObject &Obj, const DWARFSection &StringOffsetsSection, StringRef StringSection, DWARFContext::unit_iterator_range Units, bool LittleEndian) |
| static void | dumpStringOffsetsSection (raw_ostream &OS, StringRef SectionName, const DWARFObject &Obj, const DWARFSection &StringOffsetsSection, StringRef StringSection, DWARFContext::unit_iterator_range Units, bool LittleEndian, unsigned MaxVersion) |
| static void | dumpAddrSection (raw_ostream &OS, DWARFDataExtractor &AddrData, DIDumpOptions DumpOpts, uint16_t Version, uint8_t AddrSize) |
| static void | dumpRnglistsSection (raw_ostream &OS, DWARFDataExtractor &rnglistData, llvm::function_ref< Optional< object::SectionedAddress >(uint32_t)> LookupPooledAddress, DIDumpOptions DumpOpts) |
| static void | dumpLoclistsSection (raw_ostream &OS, DIDumpOptions DumpOpts, DWARFDataExtractor Data, const MCRegisterInfo *MRI, const DWARFObject &Obj, Optional< uint64_t > DumpOffset) |
| template<typename T > | |
| static T & | getAccelTable (std::unique_ptr< T > &Cache, const DWARFObject &Obj, const DWARFSection &Section, StringRef StringSection, bool IsLittleEndian) |
| static bool | getFunctionNameAndStartLineForAddress (DWARFCompileUnit *CU, uint64_t Address, FunctionNameKind Kind, std::string &FunctionName, uint32_t &StartLine) |
| TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address". More... | |
| static Optional< uint64_t > | getTypeSize (DWARFDie Type, uint64_t PointerSize) |
| static Optional< int64_t > | getExpressionFrameOffset (ArrayRef< uint8_t > Expr, Optional< unsigned > FrameBaseReg) |
| static Error | createError (const Twine &Reason, llvm::Error E) |
| static Expected< SymInfo > | getSymbolInfo (const object::ObjectFile &Obj, const RelocationRef &Reloc, const LoadedObjectInfo *L, std::map< SymbolRef, SymInfo > &Cache) |
| Returns the address of symbol relocation used against and a section index. More... | |
| static bool | isRelocScattered (const object::ObjectFile &Obj, const RelocationRef &Reloc) |
| #define DEBUG_TYPE "dwarf" |
Definition at line 62 of file DWARFContext.cpp.
| using ContributionCollection = std::vector<Optional<StrOffsetsContributionDescriptor> > |
Definition at line 97 of file DWARFContext.cpp.
Definition at line 64 of file DWARFContext.cpp.
Definition at line 65 of file DWARFContext.cpp.
Definition at line 66 of file DWARFContext.cpp.
|
static |
Definition at line 102 of file DWARFContext.cpp.
References llvm::StrOffsetsContributionDescriptor::Base, C, llvm::Optional< T >::hasValue(), llvm::StrOffsetsContributionDescriptor::Size, and llvm::sort().
Referenced by dumpDWARFv5StringOffsetsSection().
|
static |
Definition at line 1341 of file DWARFContext.cpp.
References llvm::inconvertibleErrorCode(), and llvm::toString().
|
static |
Definition at line 243 of file DWARFContext.cpp.
References llvm::DataExtractor::isValidOffset().
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 133 of file DWARFContext.cpp.
References collectContributionData(), llvm::DWARFSection::Data, llvm::dwarf::DWARF32, llvm::WithColor::error(), llvm::Format, llvm::format(), llvm::DataExtractor::getCStr(), llvm::DWARFDataExtractor::getRelocatedValue(), llvm::COFF::SectionSize, llvm::StringRef::size(), and llvm::IndexedInstrProf::Version.
Referenced by dumpStringOffsetsSection().
|
static |
Definition at line 288 of file DWARFContext.cpp.
References llvm::DWARFListTableHeader::dump(), E, llvm::WithColor::error(), llvm::DWARFListTableHeader::extract(), llvm::DWARFListTableHeader::getAddrSize(), llvm::DWARFListTableHeader::getHeaderOffset(), llvm::DWARFListTableHeader::getVersion(), llvm::DataExtractor::isValidOffset(), llvm::DWARFListTableHeader::length(), llvm::None, llvm::DataExtractor::setAddressSize(), and llvm::toString().
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 265 of file DWARFContext.cpp.
References llvm::DataExtractor::isValidOffset().
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 207 of file DWARFContext.cpp.
References llvm::DWARFSection::Data, dumpDWARFv5StringOffsetsSection(), llvm::format(), llvm::DataExtractor::getCStr(), llvm::DataExtractor::getU32(), llvm::StringRef::size(), and llvm::size().
Referenced by llvm::DWARFContext::dump().
|
static |
Dump the UUID load command.
Definition at line 75 of file DWARFContext.cpp.
References llvm::dyn_cast(), llvm::Triple::getArchName(), and llvm::raw_ostream::write_uuid().
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 826 of file DWARFContext.cpp.
References llvm::consumeError(), E, and llvm::T.
Referenced by llvm::DWARFContext::getAppleNames(), llvm::DWARFContext::getAppleNamespaces(), llvm::DWARFContext::getAppleObjC(), llvm::DWARFContext::getAppleTypes(), and llvm::DWARFContext::getDebugNames().
|
static |
Definition at line 1062 of file DWARFContext.cpp.
References llvm::DILineInfoSpecifier::AbsoluteFilePath, llvm::consumeError(), llvm::DILocal::DeclFile, llvm::DILocal::DeclLine, llvm::decodeSLEB128(), llvm::ArrayRef< T >::empty(), llvm::DWARFDie::find(), llvm::DILocal::FrameOffset, llvm::DILocal::FunctionName, llvm::DWARFDie::getAttributeValueAsReferencedDie(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFUnit::getContext(), llvm::DWARFContext::getCUAddrSize(), llvm::DWARFContext::getLineTableForUnit(), llvm::DWARFDie::getLocations(), llvm::DWARFDie::getSubroutineName(), llvm::DWARFDie::getTag(), getTypeSize(), if(), llvm::AArch64CC::LT, llvm::DILocal::Name, Name, llvm::None, llvm::ShortName, llvm::DILocal::Size, and llvm::DILocal::TagOffset.
|
static |
TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address".
Definition at line 976 of file DWARFContext.cpp.
References llvm::SmallVectorBase::empty(), llvm::DWARFDie::getDeclLine(), llvm::DWARFUnit::getInlinedChainForAddress(), llvm::DWARFDie::getSubroutineName(), Name, and llvm::None.
Referenced by llvm::DWARFContext::getLineInfoForAddress(), and llvm::DWARFContext::getLineInfoForAddressRange().
|
static |
Returns the address of symbol relocation used against and a section index.
Used for futher relocations computation. Symbol's section load address is
Definition at line 1355 of file DWARFContext.cpp.
References SymInfo::Address, llvm::createError(), llvm::object::SymbolRef::getAddress(), llvm::object::SymbolRef::getSection(), llvm::LoadedObjectInfo::getSectionLoadAddress(), llvm::MipsISD::Ret, llvm::object::ObjectFile::section_end(), SymInfo::SectionIndex, llvm::object::SymbolicFile::symbol_end(), and llvm::Expected< T >::takeError().
Definition at line 1004 of file DWARFContext.cpp.
References llvm::DWARFDie::find(), llvm::DWARFDie::getAttributeValueAsReferencedDie(), llvm::DWARFDie::getTag(), llvm::Optional< T >::getValueOr(), and Size.
Referenced by getExpressionFrameOffset().
|
static |
Definition at line 1410 of file DWARFContext.cpp.
References llvm::dyn_cast().
1.8.13