LLVM 22.0.0git
|
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/ADT/MapVector.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/DWARFDataExtractor.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/DWARFListTable.h"
#include "llvm/DebugInfo/DWARF/DWARFLocationExpression.h"
#include "llvm/DebugInfo/DWARF/DWARFRelocMap.h"
#include "llvm/DebugInfo/DWARF/DWARFSection.h"
#include "llvm/DebugInfo/DWARF/DWARFTypeUnit.h"
#include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
#include "llvm/DebugInfo/DWARF/DWARFVerifier.h"
#include "llvm/MC/TargetRegistry.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/raw_ostream.h"
#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 | ContributionCollection |
#define DEBUG_TYPE "dwarf" |
Definition at line 65 of file DWARFContext.cpp.
using ContributionCollection |
Definition at line 780 of file DWARFContext.cpp.
Definition at line 67 of file DWARFContext.cpp.
|
static |
Definition at line 786 of file DWARFContext.cpp.
References llvm::CallingConv::C, llvm::sort(), and llvm::unique().
Referenced by dumpStringOffsetsSection().
|
static |
Definition at line 1897 of file DWARFContext.cpp.
References E(), llvm::inconvertibleErrorCode(), llvm::make_error(), and llvm::toString().
|
static |
Definition at line 899 of file DWARFContext.cpp.
References llvm::DWARFDebugAddrTable::dump(), llvm::DWARFDebugAddrTable::extract(), llvm::DWARFDebugAddrTable::getFullLength(), llvm::DataExtractor::isValidOffset(), llvm::Offset, llvm::DIDumpOptions::RecoverableErrorHandler, and llvm::DIDumpOptions::WarningHandler.
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 946 of file DWARFContext.cpp.
References llvm::Data, E(), llvm::Offset, and llvm::DIDumpOptions::RecoverableErrorHandler.
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 978 of file DWARFContext.cpp.
References llvm::Data, llvm::DWARFDebugPubTable::dump(), llvm::DWARFDebugPubTable::extract(), and llvm::DIDumpOptions::RecoverableErrorHandler.
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 922 of file DWARFContext.cpp.
References llvm::DWARFListTableBase< DWARFListType >::dump(), llvm::DWARFListTableBase< DWARFListType >::extract(), llvm::DataExtractor::isValidOffset(), llvm::Length, llvm::DWARFListTableBase< DWARFListType >::length(), llvm::Offset, and llvm::DIDumpOptions::RecoverableErrorHandler.
Referenced by llvm::DWARFContext::dump().
|
static |
Definition at line 826 of file DWARFContext.cpp.
References collectContributionData(), llvm::createStringError(), llvm::DWARFSection::Data, llvm::dwarf::DWARF32, llvm::format(), llvm::dwarf::FormatString(), llvm::DataExtractor::getCStr(), llvm::dwarf::getDwarfOffsetByteSize(), llvm::DWARFDataExtractorBase< Relocator >::getRelocatedValue(), llvm::invalid_argument, llvm::Offset, llvm::DIDumpOptions::RecoverableErrorHandler, and llvm::StringRef::size().
Referenced by llvm::DWARFContext::dump().
|
static |
Dump the UUID load command.
Definition at line 759 of file DWARFContext.cpp.
References llvm::dyn_cast(), T, and llvm::raw_ostream::write_uuid().
Referenced by llvm::DWARFContext::dump().
void fixupIndex | ( | DWARFContext & | C, |
DWARFUnitIndex & | Index ) |
Definition at line 183 of file DWARFContext.cpp.
References llvm::CallingConv::C, fixupIndexV4(), and fixupIndexV5().
void fixupIndexV4 | ( | DWARFContext & | C, |
DWARFUnitIndex & | Index ) |
Definition at line 72 of file DWARFContext.cpp.
References llvm::CallingConv::C, llvm::object::createError(), llvm::Data, llvm::DWARFSection::Data, E(), llvm::errs(), llvm::DWARFUnitIndex::Entry::SectionContribution::getOffset(), llvm::logAllUnhandledErrors(), llvm::Offset, llvm::DWARFUnitIndex::Entry::SectionContribution::setOffset(), llvm::StringRef::size(), llvm::toString(), and llvm::Twine::utohexstr().
Referenced by fixupIndex().
void fixupIndexV5 | ( | DWARFContext & | C, |
DWARFUnitIndex & | Index ) |
Definition at line 140 of file DWARFContext.cpp.
References llvm::CallingConv::C, llvm::object::createError(), llvm::Data, llvm::DWARFSection::Data, E(), llvm::errs(), llvm::logAllUnhandledErrors(), llvm::Offset, llvm::DWARFUnitIndex::Entry::SectionContribution::setOffset(), llvm::StringRef::size(), llvm::toString(), and llvm::Twine::utohexstr().
Referenced by fixupIndex().
|
static |
Definition at line 191 of file DWARFContext.cpp.
References llvm::consumeError(), E(), and T.
|
static |
Definition at line 1635 of file DWARFContext.cpp.
References llvm::Count, llvm::ArrayRef< T >::data(), llvm::decodeSLEB128(), llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), llvm::Offset, and llvm::ArrayRef< T >::size().
|
static |
TODO: change input parameter from "uint64_t Address" into "SectionedAddress Address".
Definition at line 1600 of file DWARFContext.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::empty(), and llvm::dwarf::toSectionedAddress().
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 1911 of file DWARFContext.cpp.
References llvm::createError(), llvm::dyn_cast(), llvm::object::SectionRef::getAddress(), llvm::object::SymbolRef::getAddress(), llvm::object::SectionRef::getIndex(), llvm::object::SymbolRef::getSection(), llvm::object::ObjectFile::section_end(), llvm::object::SymbolicFile::symbol_end(), and llvm::Expected< T >::takeError().
|
static |
Definition at line 1966 of file DWARFContext.cpp.
References llvm::dyn_cast(), llvm::object::MachOObjectFile::getRelocation(), and llvm::object::MachOObjectFile::isRelocationScattered().