LLVM  7.0.0svn
Classes | Public Member Functions | List of all members
llvm::DWARFVerifier Class Reference

A class that verifies DWARF debug information given a DWARF Context. More...

#include "llvm/DebugInfo/DWARF/DWARFVerifier.h"

Classes

struct  DieRangeInfo
 A class that keeps the address range information for a single DIE. More...
 

Public Member Functions

 DWARFVerifier (raw_ostream &S, DWARFContext &D, DIDumpOptions DumpOpts=DIDumpOptions::getForSingleDIE())
 
bool handleDebugAbbrev ()
 Verify the information in any of the following sections, if available: .debug_abbrev, debug_abbrev.dwo. More...
 
bool handleDebugInfo ()
 Verify the information in the .debug_info section. More...
 
bool handleDebugLine ()
 Verify the information in the .debug_line section. More...
 
bool handleAccelTables ()
 Verify the information in accelerator tables, if they exist. More...
 

Detailed Description

A class that verifies DWARF debug information given a DWARF Context.

Definition at line 35 of file DWARFVerifier.h.

Constructor & Destructor Documentation

◆ DWARFVerifier()

llvm::DWARFVerifier::DWARFVerifier ( raw_ostream S,
DWARFContext D,
DIDumpOptions  DumpOpts = DIDumpOptions::getForSingleDIE() 
)
inline

Member Function Documentation

◆ handleAccelTables()

bool DWARFVerifier::handleAccelTables ( )

Verify the information in accelerator tables, if they exist.

Any errors are reported to the stream that was this object was constructed with.

Returns
true if the existing Apple-style accelerator tables verify successfully, false otherwise.

Definition at line 1321 of file DWARFVerifier.cpp.

References D, llvm::DWARFSection::Data, llvm::StringRef::empty(), llvm::WithColor::error(), llvm::DWARFObject::getAppleNamespacesSection(), llvm::DWARFObject::getAppleNamesSection(), llvm::DWARFObject::getAppleObjCSection(), llvm::DWARFObject::getAppleTypesSection(), llvm::DWARFObject::getDebugNamesSection(), llvm::DWARFObject::getStringSection(), llvm::WithColor::note(), and llvm::WithColor::warning().

Referenced by DWARFVerifier(), and llvm::DWARFContext::verify().

◆ handleDebugAbbrev()

bool DWARFVerifier::handleDebugAbbrev ( )

Verify the information in any of the following sections, if available: .debug_abbrev, debug_abbrev.dwo.

Any errors are reported to the stream that was this object was constructed with.

Returns
true if .debug_abbrev and .debug_abbrev.dwo verify successfully, false otherwise.

Definition at line 235 of file DWARFVerifier.cpp.

References llvm::StringRef::empty(), llvm::DWARFObject::getAbbrevDWOSection(), and llvm::DWARFObject::getAbbrevSection().

Referenced by DWARFVerifier(), and llvm::DWARFContext::verify().

◆ handleDebugInfo()

bool DWARFVerifier::handleDebugInfo ( )

Verify the information in the .debug_info section.

Any errors are reported to the stream that was this object was constructed with.

Returns
true if the .debug_info verifies successfully, false otherwise.

Definition at line 255 of file DWARFVerifier.cpp.

References llvm::DILineInfoSpecifier::AbsoluteFilePath, llvm::any_of(), assert(), llvm::DWARFAttribute::Attr, llvm::DWARFVerifier::DieRangeInfo::Children, llvm::DWARFVerifier::DieRangeInfo::contains(), D, llvm::DWARFSection::Data, llvm::Data, llvm::DWARFVerifier::DieRangeInfo::Die, llvm::DWARFDie::dump(), llvm::DWARFDebugLine::Row::dumpTableHeader(), llvm::StringMap< ValueTy, AllocatorTy >::end(), error, llvm::DWARFUnitHeader::extract(), llvm::DWARFDie::find(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::format(), llvm::formatv(), llvm::dwarf::FormEncodingString(), llvm::DWARFUnit::getAddressByteSize(), llvm::DWARFDie::getAddressRanges(), llvm::DWARFObject::getAppleObjCSection(), llvm::DWARFFormValue::getAsBlock(), llvm::DWARFFormValue::getAsReference(), llvm::DWARFFormValue::getAsSectionOffset(), llvm::DWARFDie::getDwarfUnit(), llvm::DWARFFormValue::getForm(), llvm::DWARFObject::getInfoSection(), llvm::DWARFObject::getLineSection(), llvm::DWARFUnit::getNextUnitOffset(), llvm::DWARFDie::getOffset(), llvm::DWARFObject::getRangeSection(), llvm::DWARFFormValue::getRawUValue(), llvm::DWARFObject::getStringOffsetSection(), llvm::DWARFObject::getStringSection(), llvm::DWARFDie::getTag(), llvm::DWARFUnit::getVersion(), llvm::DWARFVerifier::DieRangeInfo::insert(), llvm::DWARFExpression::Operation::isError(), llvm::DWARFDie::isValid(), llvm::DataExtractor::isValidOffset(), llvm_unreachable, llvm::DWARFVerifier::DieRangeInfo::Ranges, ReportError(), llvm::StringRef::size(), llvm::dwarf::toSectionOffset(), llvm::toStringRef(), and llvm::DWARFAttribute::Value.

Referenced by DWARFVerifier(), and llvm::DWARFContext::verify().

◆ handleDebugLine()

bool DWARFVerifier::handleDebugLine ( )

Verify the information in the .debug_line section.

Any errors are reported to the stream that was this object was constructed with.

Returns
true if the .debug_line verifies successfully, false otherwise.

Definition at line 667 of file DWARFVerifier.cpp.

References llvm::array_pod_sort(), B, llvm::caseFoldingDjbHash(), llvm::DWARFDebugNames::Abbrev::Code, E, llvm::StringRef::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::ArrayRef< T >::end(), llvm::WebAssembly::End, error, llvm::DWARFFormValue::FC_Constant, llvm::DWARFFormValue::FC_Reference, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::find_if(), llvm::DWARFDebugNames::AttributeEncoding::Form, llvm::format(), llvm::formatv(), llvm::dwarf::FormEncodingString(), llvm::DWARFDebugNames::NameIndex::getAbbrevs(), llvm::DWARFDebugNames::NameIndex::getBucketArrayEntry(), llvm::DWARFDebugNames::NameIndex::getBucketCount(), llvm::DataExtractor::getCStr(), llvm::DWARFDebugNames::NameIndex::getCUCount(), llvm::DWARFDebugNames::NameIndex::getForeignTUCount(), llvm::DWARFDebugNames::NameIndex::getHashArrayEntry(), llvm::DWARFDebugNames::NameIndex::getLocalTUCount(), llvm::DWARFDebugNames::NameIndex::getNameCount(), llvm::DWARFDebugNames::NameIndex::getNameTableEntry(), llvm::DWARFDebugNames::NameTableEntry::getString(), llvm::DWARFDie::getTag(), llvm::DWARFDebugNames::NameIndex::getUnitOffset(), llvm::DWARFDebugNames::AttributeEncoding::Index, llvm::DWARFFormValue::isFormClass(), llvm::max(), llvm::operator<(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::reserve(), llvm::dwarf::TagString(), and llvm::dwarf::toString().

Referenced by DWARFVerifier(), and llvm::DWARFContext::verify().


The documentation for this class was generated from the following files: