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));
154 static_cast<dwarf::LocationListEntry>(Data.
getU8(Offset))) {
157 <<
" not implemented\n";
165 unsigned Bytes = Data.
getU16(Offset);
172 LL.
Entries.push_back(std::move(E));
184 Locations.push_back(std::move(*LL));
193 Locations.begin(), Locations.end(),
Offset,
195 if (It != Locations.end() && It->Offset ==
Offset)
201 unsigned AddressSize,
207 OS <<
"Addr idx " <<
E.Start <<
" (w/ length " <<
E.Length <<
"): ";
215 OS <<
format(
"0x%8.8x: ", L.Offset);
216 L.dump(OS, IsLittleEndian, AddressSize, MRI, 12);
222 DumpLocationList(*L);
A list of locations that contain one variable.
Compute iterated dominance frontiers using a linear time algorithm.
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)
A single location within a location list.
LocationList const * getLocationListAtOffset(uint64_t Offset) const
Return the location list at the given offset or nullptr.
SmallVector< char, 4 > Loc
The location of the variable within the specified range.
void dump(raw_ostream &OS, bool IsLittleEndian, unsigned AddressSize, const MCRegisterInfo *RegInfo, unsigned Indent) const
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).
void parse(DataExtractor data)
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 void dumpExpression(raw_ostream &OS, ArrayRef< char > Data, bool IsLittleEndian, unsigned AddressSize, const MCRegisterInfo *MRI)
void dump(raw_ostream &OS, const MCRegisterInfo *RegInfo, Optional< uint64_t > Offset) const
Optional< LocationList > parseOneLocationList(DWARFDataExtractor Data, uint32_t *Offset)
static Optional< LocationList > parseOneLocationList(DataExtractor Data, uint32_t *Offset)
SmallVector< Entry, 2 > Entries
uint64_t Begin
The beginning address of the instruction range.
Represents base address of the CU.
SmallVector< char, 4 > Loc
This file contains constants used for implementing Dwarf debug support.
uint64_t End
The ending address of the instruction range.
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 ...