9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGLOC_H
10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGLOC_H
23struct DWARFLocationExpression;
68 std::optional<object::SectionedAddress> BaseAddr,
74 std::function<std::optional<object::SectionedAddress>(
uint32_t)>
112 std::optional<uint64_t>
Offset)
const;
This file defines the SmallVector class.
void dumpRawEntry(const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const override
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...
DWARFDebugLoc(DWARFDataExtractor Data)
void dumpRange(uint64_t StartOffset, uint64_t Size, raw_ostream &OS, const DWARFObject &Obj, DIDumpOptions DumpOpts)
Dump all location lists within the given range.
DWARFDebugLoclists(DWARFDataExtractor Data, uint16_t Version)
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...
void dumpRawEntry(const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const override
An abstract base class for various kinds of location tables (.debug_loc, .debug_loclists,...
virtual void dumpRawEntry(const DWARFLocationEntry &Entry, raw_ostream &OS, unsigned Indent, DIDumpOptions DumpOpts, const DWARFObject &Obj) const =0
DWARFLocationTable(DWARFDataExtractor Data)
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...
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
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.
const DWARFDataExtractor & getData()
virtual ~DWARFLocationTable()=default
Base class for user error types.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
void log(raw_ostream &OS) const override
Print an error message to an output stream.
std::error_code convertToErrorCode() const override
Convert this error to a std::error_code.
ResolverError(uint32_t Index, dwarf::LoclistEntries Kind)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
An efficient, type-erasing, non-owning reference to a callable.
This class implements an extremely fast bulk output stream that can only output to a stream.
LoclistEntries
DWARF v5 loc list entry encoding values.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Container for dump options that control which debug information will be dumped.
A list of locations that contain one variable.
uint64_t Offset
The beginning offset where this location list is stored in the debug_loc section.
SmallVector< DWARFLocationEntry, 2 > Entries
All the locations in which the variable is stored.
A single location within a location list.
SmallVector< uint8_t, 4 > Loc
The location expression itself (if applicable).
uint8_t Kind
The entry kind (DW_LLE_***).
uint64_t Value1
The second value of the location entry (if applicable).
uint64_t SectionIndex
The index of the section this entry is relative to (if applicable).
uint64_t Value0
The first value of the location entry (if applicable).