LLVM  14.0.0git
Functions
DWARFDie.cpp File Reference
#include "llvm/DebugInfo/DWARF/DWARFDie.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DWARF/DWARFAbbreviationDeclaration.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDebugRangeList.h"
#include "llvm/DebugInfo/DWARF/DWARFExpression.h"
#include "llvm/DebugInfo/DWARF/DWARFFormValue.h"
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/Support/DataExtractor.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormatAdapters.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cinttypes>
#include <cstdint>
#include <string>
#include <utility>
Include dependency graph for DWARFDie.cpp:

Go to the source code of this file.

Functions

static void dumpApplePropertyAttribute (raw_ostream &OS, uint64_t Val)
 
static void dumpRanges (const DWARFObject &Obj, raw_ostream &OS, const DWARFAddressRangesVector &Ranges, unsigned AddressSize, unsigned Indent, const DIDumpOptions &DumpOpts)
 
static void dumpLocationList (raw_ostream &OS, const DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts)
 
static void dumpLocationExpr (raw_ostream &OS, const DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts)
 
static DWARFDie resolveReferencedType (DWARFDie D, dwarf::Attribute Attr=DW_AT_type)
 
static DWARFDie resolveReferencedType (DWARFDie D, DWARFFormValue F)
 
static void dumpAttribute (raw_ostream &OS, const DWARFDie &Die, const DWARFAttribute &AttrValue, unsigned Indent, DIDumpOptions DumpOpts)
 
static unsigned dumpParentChain (DWARFDie Die, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, unsigned Depth=0)
 Helper to dump a DIE with all of its parents, but no siblings. More...
 

Function Documentation

◆ dumpApplePropertyAttribute()

static void dumpApplePropertyAttribute ( raw_ostream OS,
uint64_t  Val 
)
static

◆ dumpAttribute()

static void dumpAttribute ( raw_ostream OS,
const DWARFDie Die,
const DWARFAttribute AttrValue,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

Definition at line 686 of file DWARFDie.cpp.

References llvm::DILineInfoSpecifier::AbsoluteFilePath, llvm::DWARFAttribute::Attr, llvm::Attribute, llvm::dwarf::AttributeValueString(), llvm::dwarf::computeTombstoneAddress(), llvm::DWARFFormValue::createFromUValue(), llvm::createStringError(), D, llvm::DWARFFormValue::dump(), llvm::DWARFFormValue::dumpAddress(), dumpApplePropertyAttribute(), dumpLocationExpr(), dumpLocationList(), dumpRanges(), llvm::Enumerator, llvm::DWARFFormValue::FC_Block, llvm::DWARFFormValue::FC_Exprloc, llvm::DWARFFormValue::FC_SectionOffset, File, llvm::formatv(), llvm::DWARFUnit::getAddressByteSize(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFFormValue::getAsAddress(), llvm::DWARFFormValue::getAsSectionOffset(), llvm::DWARFFormValue::getAsUnsignedConstant(), llvm::DWARFDie::getAttributeValueAsReferencedDie(), llvm::DWARFUnit::getCompilationDir(), llvm::DWARFUnit::getContext(), llvm::DWARFContext::getDWARFObj(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFFormValue::getForm(), llvm::DWARFContext::getLineTableForUnit(), llvm::DWARFDie::getLowAndHighPC(), llvm::DWARFDie::getName(), llvm::DWARFUnit::getRnglistOffset(), llvm::Optional< T >::getValue(), llvm::raw_ostream::indent(), llvm::invalid_argument, llvm::DWARFFormValue::isFormClass(), llvm::DWARFDie::isValid(), llvm::LinkageName, llvm::AArch64CC::LT, llvm::DWARFAttribute::mayHaveLocationExpr(), llvm::DWARFAttribute::mayHaveLocationList(), llvm::DIDumpOptions::RecoverableErrorHandler, resolveReferencedType(), llvm::DIDumpOptions::ShowAddresses, llvm::DIDumpOptions::ShowForm, llvm::String, llvm::dwarf::toString(), llvm::DWARFAttribute::Value, and llvm::DIDumpOptions::Verbose.

Referenced by llvm::DWARFDie::dump().

◆ dumpLocationExpr()

static void dumpLocationExpr ( raw_ostream OS,
const DWARFFormValue FormValue,
DWARFUnit U,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpLocationList()

static void dumpLocationList ( raw_ostream OS,
const DWARFFormValue FormValue,
DWARFUnit U,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpParentChain()

static unsigned dumpParentChain ( DWARFDie  Die,
raw_ostream OS,
unsigned  Indent,
DIDumpOptions  DumpOpts,
unsigned  Depth = 0 
)
static

Helper to dump a DIE with all of its parents, but no siblings.

Definition at line 1060 of file DWARFDie.cpp.

References llvm::Depth, llvm::DWARFDie::dump(), llvm::DWARFDie::getParent(), and llvm::DIDumpOptions::ParentRecurseDepth.

Referenced by llvm::DWARFDie::dump().

◆ dumpRanges()

static void dumpRanges ( const DWARFObject Obj,
raw_ostream OS,
const DWARFAddressRangesVector Ranges,
unsigned  AddressSize,
unsigned  Indent,
const DIDumpOptions DumpOpts 
)
static

Definition at line 58 of file DWARFDie.cpp.

References llvm::raw_ostream::indent(), and llvm::DIDumpOptions::ShowAddresses.

Referenced by dumpAttribute().

◆ resolveReferencedType() [1/2]

static DWARFDie resolveReferencedType ( DWARFDie  D,
dwarf::Attribute  Attr = DW_AT_type 
)
static

Definition at line 111 of file DWARFDie.cpp.

References D.

Referenced by dumpAttribute().

◆ resolveReferencedType() [2/2]

static DWARFDie resolveReferencedType ( DWARFDie  D,
DWARFFormValue  F 
)
static

Definition at line 115 of file DWARFDie.cpp.

References D, and F.