LLVM 22.0.0git
|
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 | |
LLVM_ABI | DWARFVerifier (raw_ostream &S, DWARFContext &D, DIDumpOptions DumpOpts=DIDumpOptions::getForSingleDIE()) |
LLVM_ABI bool | handleDebugAbbrev () |
Verify the information in any of the following sections, if available: .debug_abbrev, debug_abbrev.dwo. | |
LLVM_ABI bool | handleDebugInfo () |
Verify the information in the .debug_info and .debug_types sections. | |
LLVM_ABI bool | handleDebugCUIndex () |
Verify the information in the .debug_cu_index section. | |
LLVM_ABI bool | handleDebugTUIndex () |
Verify the information in the .debug_tu_index section. | |
LLVM_ABI bool | handleDebugLine () |
Verify the information in the .debug_line section. | |
LLVM_ABI bool | handleAccelTables () |
Verify the information in accelerator tables, if they exist. | |
LLVM_ABI bool | handleDebugStrOffsets () |
Verify the information in the .debug_str_offsets[.dwo]. | |
LLVM_ABI bool | verifyDebugStrOffsets (std::optional< dwarf::DwarfFormat > LegacyFormat, StringRef SectionName, const DWARFSection &Section, StringRef StrData) |
LLVM_ABI void | summarize () |
Emits any aggregate information collected, depending on the dump options. |
A class that verifies DWARF debug information given a DWARF Context.
Definition at line 68 of file DWARFVerifier.h.
DWARFVerifier::DWARFVerifier | ( | raw_ostream & | S, |
DWARFContext & | D, | ||
DIDumpOptions | DumpOpts = DIDumpOptions::getForSingleDIE() ) |
Definition at line 1195 of file DWARFVerifier.cpp.
References D(), F, if(), llvm::move(), and llvm::DIDumpOptions::Verbose.
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.
Definition at line 2176 of file DWARFVerifier.cpp.
References D().
Referenced by llvm::DWARFContext::verify().
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.
Definition at line 404 of file DWARFVerifier.cpp.
References llvm::StringRef::empty(), llvm::DWARFObject::getAbbrevDWOSection(), and llvm::DWARFObject::getAbbrevSection().
Referenced by llvm::DWARFContext::verify().
bool DWARFVerifier::handleDebugCUIndex | ( | ) |
Verify the information in the .debug_cu_index section.
Any errors are reported to the stream that was this object was constructed with.
Definition at line 524 of file DWARFVerifier.cpp.
Referenced by llvm::DWARFContext::verify().
bool DWARFVerifier::handleDebugInfo | ( | ) |
Verify the information in the .debug_info and .debug_types sections.
Any errors are reported to the stream that this object was constructed with.
Definition at line 534 of file DWARFVerifier.cpp.
References llvm::DWARFObject::forEachInfoSections(), and llvm::DWARFObject::forEachTypesSections().
Referenced by llvm::DWARFContext::verify().
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.
Definition at line 1207 of file DWARFVerifier.cpp.
Referenced by llvm::DWARFContext::verify().
bool DWARFVerifier::handleDebugStrOffsets | ( | ) |
Verify the information in the .debug_str_offsets[.dwo].
Any errors are reported to the stream that was this object was constructed with.
Definition at line 2194 of file DWARFVerifier.cpp.
References llvm::DWARFObject::forEachInfoDWOSections(), llvm::DWARFDataExtractorBase< Relocator >::getInitialLength(), llvm::DWARFObject::getStrDWOSection(), llvm::DWARFObject::getStrOffsetsDWOSection(), llvm::DWARFObject::getStrOffsetsSection(), llvm::DWARFObject::getStrSection(), llvm::DataExtractor::getU16(), llvm::Offset, llvm::Success, and verifyDebugStrOffsets().
Referenced by llvm::DWARFContext::verify().
bool DWARFVerifier::handleDebugTUIndex | ( | ) |
Verify the information in the .debug_tu_index section.
Any errors are reported to the stream that was this object was constructed with.
Definition at line 529 of file DWARFVerifier.cpp.
References llvm::DW_SECT_EXT_TYPES.
Referenced by llvm::DWARFContext::verify().
void DWARFVerifier::summarize | ( | ) |
Emits any aggregate information collected, depending on the dump options.
Definition at line 2365 of file DWARFVerifier.cpp.
References llvm::Count, llvm::count(), error, llvm::sys::fs::OF_Text, and llvm::json::Object::try_emplace().
Referenced by llvm::DWARFContext::verify().
bool DWARFVerifier::verifyDebugStrOffsets | ( | std::optional< dwarf::DwarfFormat > | LegacyFormat, |
StringRef | SectionName, | ||
const DWARFSection & | Section, | ||
StringRef | StrData ) |
Definition at line 2224 of file DWARFVerifier.cpp.
References llvm::CallingConv::C, error, llvm::Format, llvm::formatv(), llvm::dwarf::getDwarfOffsetByteSize(), llvm::Length, llvm::StringRef::size(), llvm::Success, llvm::toString(), and llvm::Version.
Referenced by handleDebugStrOffsets().