LLVM  7.0.0
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/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 dumpLocation (raw_ostream &OS, DWARFFormValue &FormValue, DWARFUnit *U, unsigned Indent, DIDumpOptions DumpOpts)
 
static void dumpTypeTagName (raw_ostream &OS, dwarf::Tag T)
 Dump the name encoded in the type tag. More...
 
static void dumpTypeName (raw_ostream &OS, const DWARFDie &Die)
 Recursively dump the DIE type name when applicable. More...
 
static void dumpAttribute (raw_ostream &OS, const DWARFDie &Die, uint32_t *OffsetPtr, dwarf::Attribute Attr, dwarf::Form Form, unsigned Indent, DIDumpOptions DumpOpts)
 
static unsigned dumpParentChain (DWARFDie Die, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts)
 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,
uint32_t *  OffsetPtr,
dwarf::Attribute  Attr,
dwarf::Form  Form,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpLocation()

static void dumpLocation ( raw_ostream &  OS,
DWARFFormValue &  FormValue,
DWARFUnit *  U,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

◆ dumpParentChain()

static unsigned dumpParentChain ( DWARFDie  Die,
raw_ostream &  OS,
unsigned  Indent,
DIDumpOptions  DumpOpts 
)
static

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

Definition at line 473 of file DWARFDie.cpp.

References llvm::DWARFDie::dump(), llvm::DWARFDie::getParent(), and Indent.

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

◆ dumpTypeName()

static void dumpTypeName ( raw_ostream &  OS,
const DWARFDie &  Die 
)
static

Recursively dump the DIE type name when applicable.

Definition at line 138 of file DWARFDie.cpp.

References D, dumpTypeTagName(), llvm::DWARFDie::getAttributeValueAsReferencedDie(), llvm::DWARFDie::getName(), llvm::DWARFDie::getTag(), llvm::DWARFDie::isValid(), and llvm::LinkageName.

Referenced by dumpAttribute().

◆ dumpTypeTagName()

static void dumpTypeTagName ( raw_ostream &  OS,
dwarf::Tag  T 
)
static

Dump the name encoded in the type tag.

Definition at line 130 of file DWARFDie.cpp.

References llvm::StringRef::endswith(), llvm::StringRef::size(), llvm::StringRef::startswith(), llvm::StringRef::substr(), and llvm::dwarf::TagString().

Referenced by dumpTypeName().