LLDB  mainline
DWARFUnit.h
Go to the documentation of this file.
1 //===-- DWARFUnit.h ---------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFUNIT_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFUNIT_H
11 
12 #include "DWARFDIE.h"
13 #include "DWARFDebugInfoEntry.h"
14 #include "lldb/lldb-enumerations.h"
15 #include "lldb/Utility/XcodeSDK.h"
16 #include "llvm/Support/RWMutex.h"
17 #include <atomic>
18 
19 class DWARFUnit;
20 class DWARFCompileUnit;
21 class NameToDIE;
22 class SymbolFileDWARF;
24 
25 typedef std::shared_ptr<DWARFUnit> DWARFUnitSP;
26 
33 };
34 
35 /// Base class describing the header of any kind of "unit." Some information
36 /// is specific to certain unit types. We separate this class out so we can
37 /// parse the header before deciding what specific kind of unit to construct.
43 
45 
46  uint8_t m_unit_type = 0;
47  uint8_t m_addr_size = 0;
48 
49  uint64_t m_type_hash = 0;
51 
52  uint64_t m_dwo_id = 0;
53 
54  DWARFUnitHeader() = default;
55 
56 public:
57  dw_offset_t GetOffset() const { return m_offset; }
58  uint16_t GetVersion() const { return m_version; }
60  dw_offset_t GetLength() const { return m_length; }
62  uint8_t GetUnitType() const { return m_unit_type; }
64  return m_index_entry;
65  }
66  uint64_t GetTypeHash() const { return m_type_hash; }
68  uint64_t GetDWOId() const { return m_dwo_id; }
69  bool IsTypeUnit() const {
70  return m_unit_type == DW_UT_type || m_unit_type == DW_UT_split_type;
71  }
72  uint32_t GetNextUnitOffset() const { return m_offset + m_length + 4; }
73 
74  static llvm::Expected<DWARFUnitHeader>
76  lldb_private::DWARFContext &dwarf_context,
77  lldb::offset_t *offset_ptr);
78 };
79 
81  using die_iterator_range =
82  llvm::iterator_range<DWARFDebugInfoEntry::collection::iterator>;
83 
84 public:
85  static llvm::Expected<DWARFUnitSP>
86  extract(SymbolFileDWARF &dwarf2Data, lldb::user_id_t uid,
87  const lldb_private::DWARFDataExtractor &debug_info,
88  DIERef::Section section, lldb::offset_t *offset_ptr);
89  virtual ~DWARFUnit();
90 
91  bool IsDWOUnit() { return m_is_dwo; }
92  uint64_t GetDWOId();
93 
96  void ExtractDIEsIfNeeded();
97 
100  public:
101  bool m_clear_dies = false;
104  ScopedExtractDIEs(const ScopedExtractDIEs &) = delete;
105  const ScopedExtractDIEs &operator=(const ScopedExtractDIEs &) = delete;
108  };
110 
111  bool Verify(lldb_private::Stream *s) const;
112  virtual void Dump(lldb_private::Stream *s) const = 0;
113  /// Get the data that contains the DIE information for this unit.
114  ///
115  /// This will return the correct bytes that contain the data for
116  /// this DWARFUnit. It could be .debug_info or .debug_types
117  /// depending on where the data for this unit originates.
118  ///
119  /// \return
120  /// The correct data for the DIE information in this unit.
122 
123  /// Get the size in bytes of the unit header.
124  ///
125  /// \return
126  /// Byte size of the unit header
127  uint32_t GetHeaderByteSize() const;
128 
129  // Offset of the initial length field.
130  dw_offset_t GetOffset() const { return m_header.GetOffset(); }
131  /// Get the size in bytes of the length field in the header.
132  ///
133  /// In DWARF32 this is just 4 bytes
134  ///
135  /// \return
136  /// Byte size of the compile unit header length field
137  size_t GetLengthByteSize() const { return 4; }
138 
139  bool ContainsDIEOffset(dw_offset_t die_offset) const {
140  return die_offset >= GetFirstDIEOffset() &&
141  die_offset < GetNextUnitOffset();
142  }
144  return GetOffset() + GetHeaderByteSize();
145  }
147  // Size of the CU data (without initial length and without header).
148  size_t GetDebugInfoSize() const;
149  // Size of the CU data incl. header but without initial length.
150  uint32_t GetLength() const { return m_header.GetLength(); }
151  uint16_t GetVersion() const { return m_header.GetVersion(); }
154  uint8_t GetAddressByteSize() const { return m_header.GetAddressByteSize(); }
155  dw_addr_t GetAddrBase() const { return m_addr_base ? *m_addr_base : 0; }
160  void SetAddrBase(dw_addr_t addr_base);
161  void SetLoclistsBase(dw_addr_t loclists_base);
162  void SetRangesBase(dw_addr_t ranges_base);
163  void SetStrOffsetsBase(dw_offset_t str_offsets_base);
164  virtual void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges) = 0;
165 
167 
169 
170  void SetBaseAddress(dw_addr_t base_addr);
171 
173 
174  DWARFDIE DIE() { return DWARFDIE(this, DIEPtr()); }
175 
176  DWARFDIE GetDIE(dw_offset_t die_offset);
177 
179 
180  static uint8_t GetAddressByteSize(const DWARFUnit *cu);
181 
182  static uint8_t GetDefaultAddressSize();
183 
184  void *GetUserData() const;
185 
186  void SetUserData(void *d);
187 
189 
191 
193 
195 
197 
199 
201 
203 
204  uint64_t GetDWARFLanguageType();
205 
206  bool GetIsOptimized();
207 
210  lldb_private::FileSpec GetFile(size_t file_idx);
212 
214 
217  return die_iterator_range(m_die_array.begin(), m_die_array.end());
218  }
219 
221 
222  uint8_t GetUnitType() const { return m_header.GetUnitType(); }
223  bool IsTypeUnit() const { return m_header.IsTypeUnit(); }
224 
225  llvm::Optional<uint64_t> GetStringOffsetSectionItem(uint32_t index) const;
226 
227  /// Return a list of address ranges resulting from a (possibly encoded)
228  /// range list starting at a given offset in the appropriate ranges section.
229  llvm::Expected<DWARFRangeList> FindRnglistFromOffset(dw_offset_t offset);
230 
231  /// Return a list of address ranges retrieved from an encoded range
232  /// list whose offset is found via a table lookup given an index (DWARF v5
233  /// and later).
234  llvm::Expected<DWARFRangeList> FindRnglistFromIndex(uint32_t index);
235 
236  /// Return a rangelist's offset based on an index. The index designates
237  /// an entry in the rangelist table's offset array and is supplied by
238  /// DW_FORM_rnglistx.
239  llvm::Expected<uint64_t> GetRnglistOffset(uint32_t Index);
240 
241  llvm::Optional<uint64_t> GetLoclistOffset(uint32_t Index) {
243  return llvm::None;
244 
245  llvm::Optional<uint64_t> Offset = m_loclist_table_header->getOffsetEntry(
247  if (!Offset)
248  return llvm::None;
249  return *Offset + m_loclists_base;
250  }
251 
252  /// Return the location table for parsing the given location list data. The
253  /// format is chosen according to the unit type. Never returns null.
254  std::unique_ptr<llvm::DWARFLocationTable>
256 
258 
259 protected:
261  const DWARFUnitHeader &header,
262  const DWARFAbbreviationDeclarationSet &abbrevs,
263  DIERef::Section section, bool is_dwo);
264 
267  lldb::offset_t *offset_ptr);
268 
269  // Get the DWARF unit DWARF debug information entry. Parse the single DIE
270  // if needed.
273  // m_first_die_mutex is not required as m_first_die is never cleared.
274  if (!m_first_die)
275  return NULL;
276  return &m_first_die;
277  }
278 
279  // Get all DWARF debug informration entries. Parse all DIEs if needed.
282  if (m_die_array.empty())
283  return NULL;
284  return &m_die_array[0];
285  }
286 
287  const llvm::Optional<llvm::DWARFDebugRnglistTable> &GetRnglistTable();
288 
290 
292  std::shared_ptr<DWARFUnit> m_dwo;
295  void *m_user_data = nullptr;
296  // The compile unit debug information entry item
298  mutable llvm::sys::RWMutex m_die_array_mutex;
299  // It is used for tracking of ScopedExtractDIEs instances.
300  mutable llvm::sys::RWMutex m_die_array_scoped_mutex;
301  // ScopedExtractDIEs instances should not call ClearDIEsRWLocked()
302  // as someone called ExtractDIEsIfNeeded().
303  std::atomic<bool> m_cancel_scopes;
304  // GetUnitDIEPtrOnly() needs to return pointer to the first DIE.
305  // But the first element of m_die_array after ExtractUnitDIEIfNeeded()
306  // would possibly move in memory after later ExtractDIEsIfNeeded().
308  llvm::sys::RWMutex m_first_die_mutex;
309  // A table similar to the .debug_aranges table, but this one points to the
310  // exact DW_TAG_subprogram DIEs
311  std::unique_ptr<DWARFDebugAranges> m_func_aranges_up;
317  llvm::Optional<uint64_t> m_language_type;
319  llvm::Optional<lldb_private::FileSpec> m_comp_dir;
320  llvm::Optional<lldb_private::FileSpec> m_file_spec;
321  llvm::Optional<dw_addr_t> m_addr_base; ///< Value of DW_AT_addr_base.
322  dw_addr_t m_loclists_base = 0; ///< Value of DW_AT_loclists_base.
323  dw_addr_t m_ranges_base = 0; ///< Value of DW_AT_rnglists_base.
324  llvm::Optional<uint64_t> m_gnu_addr_base;
325  llvm::Optional<uint64_t> m_gnu_ranges_base;
326 
327  /// Value of DW_AT_stmt_list.
329 
330  dw_offset_t m_str_offsets_base = 0; // Value of DW_AT_str_offsets_base.
331 
332  llvm::Optional<llvm::DWARFDebugRnglistTable> m_rnglist_table;
333  bool m_rnglist_table_done = false;
334  llvm::Optional<llvm::DWARFListTableHeader> m_loclist_table_header;
335 
337  bool m_is_dwo;
339  /// Value of DW_AT_GNU_dwo_id (v4) or dwo_id from CU header (v5).
340  uint64_t m_dwo_id;
341 
342 private:
343  void ParseProducerInfo();
344  void ExtractDIEsRWLocked();
345  void ClearDIEsRWLocked();
346 
347  void AddUnitDIE(const DWARFDebugInfoEntry &cu_die);
348  void SetDwoStrOffsetsBase();
349 
351  void ComputeAbsolutePath();
352 
353  DWARFUnit(const DWARFUnit &) = delete;
354  const DWARFUnit &operator=(const DWARFUnit &) = delete;
355 };
356 
357 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFUNIT_H
DWARFUnit::GetRnglistData
lldb_private::DWARFDataExtractor GetRnglistData() const
Definition: DWARFUnit.cpp:516
DWARFUnit::BuildAddressRangeTable
virtual void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges)=0
DWARFUnitHeader::GetVersion
uint16_t GetVersion() const
Definition: DWARFUnit.h:58
DWARFUnit::GetRnglistOffset
llvm::Expected< uint64_t > GetRnglistOffset(uint32_t Index)
Return a rangelist's offset based on an index.
Definition: DWARFUnit.cpp:557
DWARFUnit::SetUserData
void SetUserData(void *d)
Definition: DWARFUnit.cpp:645
DWARFUnit::GetData
const lldb_private::DWARFDataExtractor & GetData() const
Get the data that contains the DIE information for this unit.
Definition: DWARFUnit.cpp:978
DWARFUnit::m_addr_base
llvm::Optional< dw_addr_t > m_addr_base
Value of DW_AT_addr_base.
Definition: DWARFUnit.h:321
DWARFDIE.h
eProducerClang
@ eProducerClang
Definition: DWARFUnit.h:29
DWARFUnit::GetRnglistTable
const llvm::Optional< llvm::DWARFDebugRnglistTable > & GetRnglistTable()
Definition: DWARFUnit.cpp:541
DWARFDebugAranges
Definition: DWARFDebugAranges.h:16
DWARFUnit::DWARFUnit
DWARFUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid, const DWARFUnitHeader &header, const DWARFAbbreviationDeclarationSet &abbrevs, DIERef::Section section, bool is_dwo)
Definition: DWARFUnit.cpp:32
DWARFUnit::GetProducer
DWARFProducer GetProducer()
Definition: DWARFUnit.cpp:706
DWARFUnit::ScopedExtractDIEs::m_clear_dies
bool m_clear_dies
Definition: DWARFUnit.h:101
SymbolFileDWARF::GetDWARFContext
lldb_private::DWARFContext & GetDWARFContext()
Definition: SymbolFileDWARF.h:293
DWARFUnit::GetDWOId
uint64_t GetDWOId()
Definition: DWARFUnit.cpp:346
lldb_private::UserID
Definition: UserID.h:31
DWARFUnitHeader::m_type_hash
uint64_t m_type_hash
Definition: DWARFUnit.h:49
DWARFUnit::m_loclists_base
dw_addr_t m_loclists_base
Value of DW_AT_loclists_base.
Definition: DWARFUnit.h:322
DWARFUnit::GetDwoSymbolFile
SymbolFileDWARFDwo * GetDwoSymbolFile()
Definition: DWARFUnit.cpp:834
DWARFUnit::m_header
DWARFUnitHeader m_header
Definition: DWARFUnit.h:293
DWARFUnit::m_ranges_base
dw_addr_t m_ranges_base
Value of DW_AT_rnglists_base.
Definition: DWARFUnit.h:323
DWARFProducer
DWARFProducer
Definition: DWARFUnit.h:27
DWARFUnit::ExtractDIEsRWLocked
void ExtractDIEsRWLocked()
Definition: DWARFUnit.cpp:197
DWARFUnitHeader::m_version
uint16_t m_version
Definition: DWARFUnit.h:41
SymbolFileDWARF
Definition: SymbolFileDWARF.h:58
DWARFUnit::m_comp_dir
llvm::Optional< lldb_private::FileSpec > m_comp_dir
Definition: DWARFUnit.h:319
DWARFUnit::m_rnglist_table_done
bool m_rnglist_table_done
Definition: DWARFUnit.h:333
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
DWARFUnit::ComputeCompDirAndGuessPathStyle
void ComputeCompDirAndGuessPathStyle()
Definition: DWARFUnit.cpp:798
DWARFUnit::m_dwarf
SymbolFileDWARF & m_dwarf
Definition: DWARFUnit.h:291
DWARFUnit::GetDebugInfoSize
size_t GetDebugInfoSize() const
Definition: DWARFUnit.cpp:412
DWARFUnit::ClearDIEsRWLocked
void ClearDIEsRWLocked()
Definition: DWARFUnit.cpp:581
lldb_private::Stream
Definition: Stream.h:28
lldb_private::DWARFDataExtractor
Definition: DWARFDataExtractor.h:18
DWARFUnit::extract
static llvm::Expected< DWARFUnitSP > extract(SymbolFileDWARF &dwarf2Data, lldb::user_id_t uid, const lldb_private::DWARFDataExtractor &debug_info, DIERef::Section section, lldb::offset_t *offset_ptr)
Definition: DWARFUnit.cpp:942
DWARFUnit::m_is_optimized
lldb_private::LazyBool m_is_optimized
Definition: DWARFUnit.h:318
DWARFUnit::m_base_addr
dw_addr_t m_base_addr
Definition: DWARFUnit.h:312
lldb_private::LazyBool
LazyBool
Definition: lldb-private-enumerations.h:115
DWARFUnit::GetProducerVersionMajor
uint32_t GetProducerVersionMajor()
Definition: DWARFUnit.cpp:712
DWARFUnitHeader::m_index_entry
const llvm::DWARFUnitIndex::Entry * m_index_entry
Definition: DWARFUnit.h:44
DWARFUnit::GetStrOffsetsBase
dw_addr_t GetStrOffsetsBase() const
Definition: DWARFUnit.h:159
DWARFDebugInfoEntry
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
Definition: DWARFDebugInfoEntry.h:31
DW_INVALID_OFFSET
#define DW_INVALID_OFFSET
Definition: dwarf.h:34
DWARFUnitHeader::m_offset
dw_offset_t m_offset
Definition: DWARFUnit.h:39
DWARFUnit::FindRnglistFromOffset
llvm::Expected< DWARFRangeList > FindRnglistFromOffset(dw_offset_t offset)
Return a list of address ranges resulting from a (possibly encoded) range list starting at a given of...
Definition: DWARFUnit.cpp:1006
DWARFUnit::m_first_die
DWARFDebugInfoEntry m_first_die
Definition: DWARFUnit.h:307
DWARFUnit::SetLoclistsBase
void SetLoclistsBase(dw_addr_t loclists_base)
Definition: DWARFUnit.cpp:460
lldb_private::DWARFContext
Definition: DWARFContext.h:20
XcodeSDK.h
DWARFUnit::GetUnitDIEPtrOnly
const DWARFDebugInfoEntry * GetUnitDIEPtrOnly()
Definition: DWARFUnit.h:271
DWARFUnitHeader::DWARFUnitHeader
DWARFUnitHeader()=default
DWARFDIE
Definition: DWARFDIE.h:16
DWARFUnitHeader::GetOffset
dw_offset_t GetOffset() const
Definition: DWARFUnit.h:57
DWARFUnit::m_dwo
std::shared_ptr< DWARFUnit > m_dwo
Definition: DWARFUnit.h:292
DWARFUnit::GetDWARFLanguageType
uint64_t GetDWARFLanguageType()
Definition: DWARFUnit.cpp:730
lldb_private::FileSpec
Definition: FileSpec.h:56
DWARFCompileUnit
Definition: DWARFCompileUnit.h:15
DWARFUnit::GetAddressByteSize
uint8_t GetAddressByteSize() const
Definition: DWARFUnit.h:154
DWARFUnit::ScopedExtractDIEs
Definition: DWARFUnit.h:98
DWARFUnit::AddUnitDIE
void AddUnitDIE(const DWARFDebugInfoEntry &cu_die)
Definition: DWARFUnit.cpp:352
DWARFUnit
Definition: DWARFUnit.h:80
DWARFUnit::m_abbrevs
const DWARFAbbreviationDeclarationSet * m_abbrevs
Definition: DWARFUnit.h:294
DWARFUnitHeader::GetDWOId
uint64_t GetDWOId() const
Definition: DWARFUnit.h:68
DWARFUnit::GetCompilationDirectory
const lldb_private::FileSpec & GetCompilationDirectory()
Definition: DWARFUnit.cpp:762
DWARFUnit::GetLocationTable
std::unique_ptr< llvm::DWARFLocationTable > GetLocationTable(const lldb_private::DataExtractor &data) const
Return the location table for parsing the given location list data.
Definition: DWARFUnit.cpp:492
DWARFUnit::m_cancel_scopes
std::atomic< bool > m_cancel_scopes
Definition: DWARFUnit.h:303
DWARFUnit::ExtractUnitDIENoDwoIfNeeded
void ExtractUnitDIENoDwoIfNeeded()
Definition: DWARFUnit.cpp:43
dwarf
Definition: ABISysV_arc.cpp:61
DWARFUnit::GetNextUnitOffset
dw_offset_t GetNextUnitOffset() const
Definition: DWARFUnit.h:146
lldb_private::DataExtractor
Definition: DataExtractor.h:48
DWARFUnit::m_producer_version_major
uint32_t m_producer_version_major
Definition: DWARFUnit.h:314
DWARFUnit::ScopedExtractDIEs::ScopedExtractDIEs
ScopedExtractDIEs(DWARFUnit &cu)
Definition: DWARFUnit.cpp:164
DWARFUnit::ParseProducerInfo
void ParseProducerInfo()
Definition: DWARFUnit.cpp:667
DWARFUnit::GetAddrBase
dw_addr_t GetAddrBase() const
Definition: DWARFUnit.h:155
DWARFUnitSP
std::shared_ptr< DWARFUnit > DWARFUnitSP
Definition: DWARFUnit.h:23
DWARFUnitHeader::GetNextUnitOffset
uint32_t GetNextUnitOffset() const
Definition: DWARFUnit.h:72
DWARFUnit::Dump
virtual void Dump(lldb_private::Stream *s) const =0
DWARFUnit::~DWARFUnit
virtual ~DWARFUnit()
DWARFUnitHeader::GetAbbrOffset
dw_offset_t GetAbbrOffset() const
Definition: DWARFUnit.h:61
DWARFUnit::GetPathStyle
lldb_private::FileSpec::Style GetPathStyle()
Definition: DWARFUnit.cpp:756
DWARFUnit::GetAbbrevOffset
dw_offset_t GetAbbrevOffset() const
Definition: DWARFUnit.cpp:420
DWARFUnitHeader::m_addr_size
uint8_t m_addr_size
Definition: DWARFUnit.h:47
DWARFUnit::ScopedExtractDIEs::m_cu
DWARFUnit * m_cu
Definition: DWARFUnit.h:99
DWARFUnit::GetStringOffsetSectionItem
llvm::Optional< uint64_t > GetStringOffsetSectionItem(uint32_t index) const
Definition: DWARFUnit.cpp:1000
DWARFUnit::ScopedExtractDIEs::~ScopedExtractDIEs
~ScopedExtractDIEs()
Definition: DWARFUnit.cpp:168
DWARFUnit::GetFirstDIEOffset
dw_offset_t GetFirstDIEOffset() const
Definition: DWARFUnit.h:143
DWARFUnit::m_func_aranges_up
std::unique_ptr< DWARFDebugAranges > m_func_aranges_up
Definition: DWARFUnit.h:311
DWARFUnit::SetStrOffsetsBase
void SetStrOffsetsBase(dw_offset_t str_offsets_base)
Definition: DWARFUnit.cpp:576
DWARFUnit::m_str_offsets_base
dw_offset_t m_str_offsets_base
Definition: DWARFUnit.h:330
DWARFUnit::m_dwo_id
uint64_t m_dwo_id
Value of DW_AT_GNU_dwo_id (v4) or dwo_id from CU header (v5).
Definition: DWARFUnit.h:340
DWARFUnit::GetProducerVersionUpdate
uint32_t GetProducerVersionUpdate()
Definition: DWARFUnit.cpp:724
lldb-enumerations.h
DWARFUnitHeader::GetUnitType
uint8_t GetUnitType() const
Definition: DWARFUnit.h:62
DWARFUnit::Supports_unnamed_objc_bitfields
bool Supports_unnamed_objc_bitfields()
Definition: DWARFUnit.cpp:657
DWARFUnit::GetProducerVersionMinor
uint32_t GetProducerVersionMinor()
Definition: DWARFUnit.cpp:718
DWARFUnit::m_die_array_scoped_mutex
llvm::sys::RWMutex m_die_array_scoped_mutex
Definition: DWARFUnit.h:300
DWARFUnitHeader::IsTypeUnit
bool IsTypeUnit() const
Definition: DWARFUnit.h:69
DWARFUnitHeader
Base class describing the header of any kind of "unit." Some information is specific to certain unit ...
Definition: DWARFUnit.h:38
DWARFUnit::DIEPtr
const DWARFDebugInfoEntry * DIEPtr()
Definition: DWARFUnit.h:280
DWARFUnit::GetHeaderByteSize
uint32_t GetHeaderByteSize() const
Get the size in bytes of the unit header.
Definition: DWARFUnit.cpp:984
DWARFUnit::m_producer_version_minor
uint32_t m_producer_version_minor
Definition: DWARFUnit.h:315
DWARFUnitHeader::m_type_offset
uint32_t m_type_offset
Definition: DWARFUnit.h:50
DWARFUnit::die_iterator_range
llvm::iterator_range< DWARFDebugInfoEntry::collection::iterator > die_iterator_range
Definition: DWARFUnit.h:82
DWARFUnit::GetByteOrder
lldb::ByteOrder GetByteOrder() const
Definition: DWARFUnit.cpp:589
DWARFUnit::ScopedExtractDIEs::operator=
const ScopedExtractDIEs & operator=(const ScopedExtractDIEs &)=delete
DWARFUnit::GetBaseAddress
dw_addr_t GetBaseAddress() const
Definition: DWARFUnit.h:156
DWARFUnit::GetLineTableOffset
dw_offset_t GetLineTableOffset()
Definition: DWARFUnit.cpp:424
eProducerLLVMGCC
@ eProducerLLVMGCC
Definition: DWARFUnit.h:31
DWARFUnit::dies
die_iterator_range dies()
Definition: DWARFUnit.h:215
eProducerGCC
@ eProducerGCC
Definition: DWARFUnit.h:30
DWARFUnit::GetOffset
dw_offset_t GetOffset() const
Definition: DWARFUnit.h:130
DWARFUnit::IsDWOUnit
bool IsDWOUnit()
Definition: DWARFUnit.h:91
DWARFUnit::GetFunctionAranges
const DWARFDebugAranges & GetFunctionAranges()
Definition: DWARFUnit.cpp:841
lldb_private::FileSpec::Style
llvm::sys::path::Style Style
Definition: FileSpec.h:58
DWARFUnit::m_producer
DWARFProducer m_producer
Definition: DWARFUnit.h:313
DWARFUnit::m_is_dwo
bool m_is_dwo
Definition: DWARFUnit.h:337
DWARFUnit::operator=
const DWARFUnit & operator=(const DWARFUnit &)=delete
DWARFUnit::ExtractDIEsScoped
ScopedExtractDIEs ExtractDIEsScoped()
Definition: DWARFUnit.cpp:144
eProducerInvalid
@ eProducerInvalid
Definition: DWARFUnit.h:28
DWARFUnit::m_rnglist_table
llvm::Optional< llvm::DWARFDebugRnglistTable > m_rnglist_table
Definition: DWARFUnit.h:332
DWARFAbbreviationDeclarationSet
Definition: DWARFDebugAbbrev.h:27
DWARFUnit::SetRangesBase
void SetRangesBase(dw_addr_t ranges_base)
Definition: DWARFUnit.cpp:534
DWARFUnitHeader::m_unit_type
uint8_t m_unit_type
Definition: DWARFUnit.h:46
DWARFUnit::DW_AT_decl_file_attributes_are_invalid
bool DW_AT_decl_file_attributes_are_invalid()
Definition: DWARFUnit.cpp:651
DWARFUnit::GetLength
uint32_t GetLength() const
Definition: DWARFUnit.h:150
DWARFUnitHeader::GetAddressByteSize
uint16_t GetAddressByteSize() const
Definition: DWARFUnit.h:59
DWARFUnit::m_section
const DIERef::Section m_section
Definition: DWARFUnit.h:336
uint32_t
DWARFDebugInfoEntry.h
DWARFUnit::GetUnitDIEOnly
DWARFBaseDIE GetUnitDIEOnly()
Definition: DWARFUnit.h:172
DWARFUnit::SetBaseAddress
void SetBaseAddress(dw_addr_t base_addr)
Definition: DWARFUnit.cpp:593
DWARFUnit::GetVersion
uint16_t GetVersion() const
Definition: DWARFUnit.h:151
DWARFUnit::ExtractDIEsIfNeeded
void ExtractDIEsIfNeeded()
Definition: DWARFUnit.cpp:124
DWARFUnit::m_language_type
llvm::Optional< uint64_t > m_language_type
Definition: DWARFUnit.h:317
DWARFUnit::IsTypeUnit
bool IsTypeUnit() const
Definition: DWARFUnit.h:223
DWARFUnit::m_has_parsed_non_skeleton_unit
bool m_has_parsed_non_skeleton_unit
Definition: DWARFUnit.h:338
DWARFUnit::m_gnu_addr_base
llvm::Optional< uint64_t > m_gnu_addr_base
Definition: DWARFUnit.h:324
DWARFUnit::Verify
bool Verify(lldb_private::Stream *s) const
DWARFUnitHeader::m_abbr_offset
dw_offset_t m_abbr_offset
Definition: DWARFUnit.h:42
DWARFUnit::m_line_table_offset
dw_offset_t m_line_table_offset
Value of DW_AT_stmt_list.
Definition: DWARFUnit.h:328
DWARFUnit::m_user_data
void * m_user_data
Definition: DWARFUnit.h:295
SymbolFileDWARFDwo
Definition: SymbolFileDWARFDwo.h:14
DWARFUnit::GetNonSkeletonUnit
DWARFUnit & GetNonSkeletonUnit()
Definition: DWARFUnit.cpp:628
DWARFUnit::Supports_DW_AT_APPLE_objc_complete_type
bool Supports_DW_AT_APPLE_objc_complete_type()
Definition: DWARFUnit.cpp:647
DWARFUnitHeader::m_length
dw_offset_t m_length
Definition: DWARFUnit.h:40
DWARFUnitHeader::GetIndexEntry
const llvm::DWARFUnitIndex::Entry * GetIndexEntry() const
Definition: DWARFUnit.h:63
DWARFUnit::GetLengthByteSize
size_t GetLengthByteSize() const
Get the size in bytes of the length field in the header.
Definition: DWARFUnit.h:137
lldb_private::DWARFDataExtractor::GetAsLLVM
llvm::DWARFDataExtractor GetAsLLVM() const
Definition: DWARFDataExtractor.cpp:24
uint16_t
DWARFUnitHeader::GetTypeOffset
dw_offset_t GetTypeOffset() const
Definition: DWARFUnit.h:67
DWARFUnit::m_first_die_mutex
llvm::sys::RWMutex m_first_die_mutex
Definition: DWARFUnit.h:308
DWARFUnit::GetLocationData
lldb_private::DWARFDataExtractor GetLocationData() const
Definition: DWARFUnit.cpp:502
DWARFUnit::GetUnitType
uint8_t GetUnitType() const
Definition: DWARFUnit.h:222
DWARFUnit::m_producer_version_update
uint32_t m_producer_version_update
Definition: DWARFUnit.h:316
DWARFUnit::ComputeAbsolutePath
void ComputeAbsolutePath()
Definition: DWARFUnit.cpp:820
DWARFUnit::ExtractUnitDIEIfNeeded
void ExtractUnitDIEIfNeeded()
Definition: DWARFUnit.cpp:71
DWARFUnit::GetLoclistOffset
llvm::Optional< uint64_t > GetLoclistOffset(uint32_t Index)
Definition: DWARFUnit.h:241
DWARFUnit::GetUserData
void * GetUserData() const
Definition: DWARFUnit.cpp:643
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
DWARFUnit::m_die_array
DWARFDebugInfoEntry::collection m_die_array
Definition: DWARFUnit.h:297
eProcucerOther
@ eProcucerOther
Definition: DWARFUnit.h:32
DWARFUnit::m_gnu_ranges_base
llvm::Optional< uint64_t > m_gnu_ranges_base
Definition: DWARFUnit.h:325
DWARFDebugInfoEntry::collection
std::vector< DWARFDebugInfoEntry > collection
Definition: DWARFDebugInfoEntry.h:33
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
DWARFUnitHeader::extract
static llvm::Expected< DWARFUnitHeader > extract(const lldb_private::DWARFDataExtractor &data, DIERef::Section section, lldb_private::DWARFContext &dwarf_context, lldb::offset_t *offset_ptr)
Definition: DWARFUnit.cpp:862
Error
llvm::Error Error
Definition: UdtRecordCompleter.cpp:29
DWARFUnit::DIE
DWARFDIE DIE()
Definition: DWARFUnit.h:174
DWARFUnitHeader::GetTypeHash
uint64_t GetTypeHash() const
Definition: DWARFUnit.h:66
DWARFUnit::SetAddrBase
void SetAddrBase(dw_addr_t addr_base)
Definition: DWARFUnit.cpp:429
Entry
FormatEntity::Entry Entry
Definition: FormatEntity.cpp:82
DWARFUnit::ContainsDIEOffset
bool ContainsDIEOffset(dw_offset_t die_offset) const
Definition: DWARFUnit.h:139
DWARFUnit::GetDefaultAddressSize
static uint8_t GetDefaultAddressSize()
Definition: DWARFUnit.cpp:641
DWARFUnit::GetRangesBase
dw_addr_t GetRangesBase() const
Definition: DWARFUnit.h:158
DWARFUnit::GetSymbolFileDWARF
SymbolFileDWARF & GetSymbolFileDWARF() const
Definition: DWARFUnit.h:194
DWARFUnit::m_die_array_mutex
llvm::sys::RWMutex m_die_array_mutex
Definition: DWARFUnit.h:298
DWARFUnit::GetAbbreviations
const DWARFAbbreviationDeclarationSet * GetAbbreviations() const
Definition: DWARFUnit.cpp:416
DWARFUnit::FindRnglistFromIndex
llvm::Expected< DWARFRangeList > FindRnglistFromIndex(uint32_t index)
Return a list of address ranges retrieved from an encoded range list whose offset is found via a tabl...
Definition: DWARFUnit.cpp:1052
DWARFUnit::GetDebugSection
DIERef::Section GetDebugSection() const
Definition: DWARFUnit.h:220
dw_addr_t
uint64_t dw_addr_t
Definition: dwarf.h:26
DWARFUnit::GetIsOptimized
bool GetIsOptimized()
Definition: DWARFUnit.cpp:742
DWARFUnit::SetDwoStrOffsetsBase
void SetDwoStrOffsetsBase()
Definition: DWARFUnit.cpp:317
DWARFUnit::m_loclist_table_header
llvm::Optional< llvm::DWARFListTableHeader > m_loclist_table_header
Definition: DWARFUnit.h:334
DWARFUnitHeader::m_dwo_id
uint64_t m_dwo_id
Definition: DWARFUnit.h:52
NameToDIE
Definition: NameToDIE.h:21
DWARFUnit::ExtractHeader
llvm::Error ExtractHeader(SymbolFileDWARF &dwarf, const lldb_private::DWARFDataExtractor &data, lldb::offset_t *offset_ptr)
DIERef::Section
Section
Definition: DIERef.h:28
DWARFUnit::GetFile
lldb_private::FileSpec GetFile(size_t file_idx)
Definition: DWARFUnit.cpp:774
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition: lldb-enumerations.h:138
DWARFBaseDIE
Definition: DWARFBaseDIE.h:25
DWARFUnit::GetAbsolutePath
const lldb_private::FileSpec & GetAbsolutePath()
Definition: DWARFUnit.cpp:768
lldb_private::DWARFContext::getOrLoadLocListsData
const DWARFDataExtractor & getOrLoadLocListsData()
Definition: DWARFContext.cpp:88
DWARFUnitHeader::GetLength
dw_offset_t GetLength() const
Definition: DWARFUnit.h:60
DWARFUnit::m_file_spec
llvm::Optional< lldb_private::FileSpec > m_file_spec
Definition: DWARFUnit.h:320
DWARFUnit::GetDIE
DWARFDIE GetDIE(dw_offset_t die_offset)
Definition: DWARFUnit.cpp:607