33 bool IsLittleEndian,
unsigned AddressSize,
36 IsLittleEndian, AddressSize);
48 OS <<
format(
"[0x%*.*" PRIx64
", ", AddressSize * 2, AddressSize * 2,
49 BaseAddress +
E.Begin);
50 OS <<
format(
" 0x%*.*" PRIx64
")", AddressSize * 2, AddressSize * 2,
61 Locations.begin(), Locations.end(),
Offset,
63 if (It != Locations.end() && It->Offset ==
Offset)
71 OS <<
format(
"0x%8.8x: ", L.Offset);
72 L.dump(OS, IsLittleEndian, AddressSize, MRI, 0, 12);
118 unsigned Bytes = Data.
getU16(Offset);
128 LL.
Entries.push_back(std::move(E));
139 Locations.push_back(std::move(*LL));
155 static_cast<dwarf::LocationListEntry>(Data.
getU8(Offset))) {
182 <<
" not implemented\n";
196 LL.
Entries.push_back(std::move(E));
208 Locations.push_back(std::move(*LL));
217 Locations.begin(), Locations.end(),
Offset,
219 if (It != Locations.end() && It->Offset ==
Offset)
226 unsigned AddressSize,
234 OS <<
"Addr idx " <<
E.Value0 <<
" (w/ length " <<
E.Value1 <<
"): ";
239 OS <<
format(
"[0x%*.*" PRIx64
", 0x%*.*" PRIx64
"): ", AddressSize * 2,
240 AddressSize * 2,
E.Value0, AddressSize * 2, AddressSize * 2,
241 E.Value0 +
E.Value1);
246 OS <<
format(
"[0x%*.*" PRIx64
", 0x%*.*" PRIx64
"): ", AddressSize * 2,
247 AddressSize * 2, BaseAddr +
E.Value0, AddressSize * 2,
248 AddressSize * 2, BaseAddr +
E.Value1);
265 OS <<
format(
"0x%8.8x: ", L.Offset);
266 L.dump(OS, BaseAddr, IsLittleEndian, AddressSize, MRI, 12);
272 DumpLocationList(*L);
A list of locations that contain one variable.
This class represents lattice values for constants.
void dump(raw_ostream &OS, const MCRegisterInfo *RegInfo, Optional< uint64_t > Offset) const
Print the location lists found within the debug_loc section.
unsigned Offset
The beginning offset where this location list is stored in the debug_loc section. ...
void print(raw_ostream &OS, const MCRegisterInfo *RegInfo, bool IsEH=false) const
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
static raw_ostream & error()
Convenience method for printing "error: " to stderr.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
raw_ostream & indent(unsigned NumSpaces)
indent - Insert 'NumSpaces' spaces.
void reserve(size_type N)
void dump(raw_ostream &OS, uint64_t BaseAddr, const MCRegisterInfo *RegInfo, Optional< uint64_t > Offset) const
A single location within a location list.
void dump(raw_ostream &OS, uint64_t BaseAddr, bool IsLittleEndian, unsigned AddressSize, const MCRegisterInfo *RegInfo, unsigned Indent) const
SmallVector< char, 4 > Loc
The location of the variable within the specified range.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
auto lower_bound(R &&Range, ForwardIt I) -> decltype(adl_begin(Range))
Provide wrappers to std::lower_bound which take ranges instead of having to pass begin/end explicitly...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
unsigned const MachineRegisterInfo * MRI
void dump(raw_ostream &OS, bool IsLittleEndian, unsigned AddressSize, const MCRegisterInfo *MRI, uint64_t BaseAddress, unsigned Indent) const
Dump this list on OS.
LocationList const * getLocationListAtOffset(uint64_t Offset) const
Return the location list at the given offset or nullptr.
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
static Optional< LocationList > parseOneLocationList(DataExtractor Data, unsigned *Offset, unsigned Version)
SmallVector< Entry, 2 > Entries
static void dumpExpression(raw_ostream &OS, ArrayRef< char > Data, bool IsLittleEndian, unsigned AddressSize, const MCRegisterInfo *MRI)
Optional< LocationList > parseOneLocationList(DWARFDataExtractor Data, uint32_t *Offset)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
uint64_t Begin
The beginning address of the instruction range.
LocationList const * getLocationListAtOffset(uint64_t Offset) const
Return the location list at the given offset or nullptr.
This file contains constants used for implementing Dwarf debug support.
void parse(DataExtractor data, unsigned Version)
uint64_t End
The ending address of the instruction range.
SmallVector< char, 4 > Loc
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
OutputIt copy(R &&Range, OutputIt Out)
SmallVector< Entry, 2 > Entries
All the locations in which the variable is stored.
void parse(const DWARFDataExtractor &data)
Parse the debug_loc section accessible via the 'data' parameter using the address size also given in ...