LLVM  14.0.0git
Classes | Public Member Functions | Protected Member Functions | List of all members
llvm::DWARFDebugLoc Class Referencefinal

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

Inheritance diagram for llvm::DWARFDebugLoc:
Inheritance graph
[legend]
Collaboration diagram for llvm::DWARFDebugLoc:
Collaboration graph
[legend]

Classes

struct  LocationList
 A list of locations that contain one variable. More...
 

Public Member Functions

 DWARFDebugLoc (DWARFDataExtractor Data)
 
void dump (raw_ostream &OS, const MCRegisterInfo *RegInfo, const DWARFObject &Obj, DIDumpOptions DumpOpts, Optional< uint64_t > Offset) const
 Print the location lists found within the debug_loc section. More...
 
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. More...
 
- Public Member Functions inherited from llvm::DWARFLocationTable
 DWARFLocationTable (DWARFDataExtractor Data)
 
virtual ~DWARFLocationTable ()=default
 
bool dumpLocationList (uint64_t *Offset, raw_ostream &OS, Optional< object::SectionedAddress > BaseAddr, const MCRegisterInfo *MRI, const DWARFObject &Obj, DWARFUnit *U, DIDumpOptions DumpOpts, unsigned Indent) const
 Dump the location list at the given Offset. More...
 
Error visitAbsoluteLocationList (uint64_t Offset, Optional< object::SectionedAddress > BaseAddr, std::function< Optional< object::SectionedAddress >(uint32_t)> LookupAddr, function_ref< bool(Expected< DWARFLocationExpression >)> Callback) const
 
const DWARFDataExtractorgetData ()
 

Protected Member Functions

void dumpRawEntry (const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const override
 

Additional Inherited Members

- Protected Attributes inherited from llvm::DWARFLocationTable
DWARFDataExtractor Data
 

Detailed Description

Definition at line 85 of file DWARFDebugLoc.h.

Constructor & Destructor Documentation

◆ DWARFDebugLoc()

llvm::DWARFDebugLoc::DWARFDebugLoc ( DWARFDataExtractor  Data)
inline

Definition at line 104 of file DWARFDebugLoc.h.

Member Function Documentation

◆ dump()

void DWARFDebugLoc::dump ( raw_ostream OS,
const MCRegisterInfo RegInfo,
const DWARFObject Obj,
DIDumpOptions  DumpOpts,
Optional< uint64_t Offset 
) const

Print the location lists found within the debug_loc section.

Definition at line 185 of file DWARFDebugLoc.cpp.

References llvm::DWARFLocationTable::Data, llvm::DWARFLocationTable::dumpLocationList(), llvm::DataExtractor::isValidOffset(), MRI, llvm::None, and Offset.

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

◆ dumpRawEntry()

void DWARFDebugLoc::dumpRawEntry ( const DWARFLocationEntry Entry,
raw_ostream OS,
unsigned  Indent,
DIDumpOptions  DumpOpts,
const DWARFObject Obj 
) const
overrideprotectedvirtual

Implements llvm::DWARFLocationTable.

Definition at line 248 of file DWARFDebugLoc.cpp.

◆ visitLocationList()

Error DWARFDebugLoc::visitLocationList ( uint64_t Offset,
function_ref< bool(const DWARFLocationEntry &)>  Callback 
) const
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 208 of file DWARFDebugLoc.cpp.

References llvm::DWARFLocationTable::Data, E, llvm::DataExtractor::getAddressSize(), llvm::DWARFDataExtractor::getRelocatedAddress(), llvm::DataExtractor::getU16(), llvm::DataExtractor::getU8(), Offset, and llvm::Error::success().


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