LLVM 20.0.0git
|
#include "llvm/DebugInfo/DWARF/DWARFDebugLoc.h"
Classes | |
struct | LocationList |
A list of locations that contain one variable. More... | |
Public Member Functions | |
DWARFDebugLoc (DWARFDataExtractor Data) | |
void | dump (raw_ostream &OS, const DWARFObject &Obj, DIDumpOptions DumpOpts, std::optional< uint64_t > Offset) const |
Print the location lists found within the debug_loc section. | |
Error | visitLocationList (uint64_t *Offset, function_ref< bool(const DWARFLocationEntry &)> Callback) const override |
Call the user-provided callback for each entry (including the end-of-list entry) in the location list starting at Offset . | |
Public Member Functions inherited from llvm::DWARFLocationTable | |
DWARFLocationTable (DWARFDataExtractor Data) | |
virtual | ~DWARFLocationTable ()=default |
virtual Error | visitLocationList (uint64_t *Offset, function_ref< bool(const DWARFLocationEntry &)> Callback) const =0 |
Call the user-provided callback for each entry (including the end-of-list entry) in the location list starting at Offset . | |
bool | dumpLocationList (uint64_t *Offset, raw_ostream &OS, std::optional< object::SectionedAddress > BaseAddr, const DWARFObject &Obj, DWARFUnit *U, DIDumpOptions DumpOpts, unsigned Indent) const |
Dump the location list at the given Offset . | |
Error | visitAbsoluteLocationList (uint64_t Offset, std::optional< object::SectionedAddress > BaseAddr, std::function< std::optional< object::SectionedAddress >(uint32_t)> LookupAddr, function_ref< bool(Expected< DWARFLocationExpression >)> Callback) const |
const DWARFDataExtractor & | getData () |
Protected Member Functions | |
void | dumpRawEntry (const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const override |
virtual void | dumpRawEntry (const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const =0 |
Additional Inherited Members | |
Protected Attributes inherited from llvm::DWARFLocationTable | |
DWARFDataExtractor | Data |
Definition at line 88 of file DWARFDebugLoc.h.
|
inline |
Definition at line 107 of file DWARFDebugLoc.h.
void DWARFDebugLoc::dump | ( | raw_ostream & | OS, |
const DWARFObject & | Obj, | ||
DIDumpOptions | DumpOpts, | ||
std::optional< uint64_t > | Offset | ||
) | const |
Print the location lists found within the debug_loc section.
Definition at line 184 of file DWARFDebugLoc.cpp.
References llvm::DWARFLocationTable::Data, llvm::DWARFLocationTable::dumpLocationList(), llvm::DataExtractor::isValidOffset(), llvm::Offset, and OS.
Referenced by llvm::DWARFContext::dump().
|
overrideprotectedvirtual |
Implements llvm::DWARFLocationTable.
Definition at line 247 of file DWARFDebugLoc.cpp.
References llvm::DWARFLocationTable::Data, llvm::DWARFFormValue::dumpAddressSection(), llvm::format_hex(), llvm::DataExtractor::getAddressSize(), llvm::raw_ostream::indent(), llvm_unreachable, and OS.
|
overridevirtual |
Call the user-provided callback for each entry (including the end-of-list entry) in the location list starting at Offset
.
The callback can return false to terminate the iteration early. Returns an error if it was unable to parse the entire location list correctly. Upon successful termination Offset
will be updated point past the end of the list.
Implements llvm::DWARFLocationTable.
Definition at line 207 of file DWARFDebugLoc.cpp.
References llvm::CallingConv::C, llvm::DWARFLocationTable::Data, llvm::DataExtractor::getAddressSize(), llvm::DWARFDataExtractor::getRelocatedAddress(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU8(), llvm::DWARFLocationEntry::Kind, llvm::DWARFLocationEntry::Loc, llvm::Offset, llvm::DWARFLocationEntry::SectionIndex, llvm::Error::success(), llvm::DWARFLocationEntry::Value0, and llvm::DWARFLocationEntry::Value1.