LLDB  mainline
SymbolContext.h
Go to the documentation of this file.
1 //===-- SymbolContext.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_SYMBOL_SYMBOLCONTEXT_H
10 #define LLDB_SYMBOL_SYMBOLCONTEXT_H
11 
12 #include <memory>
13 #include <string>
14 #include <vector>
15 
16 #include "lldb/Core/Address.h"
17 #include "lldb/Core/Mangled.h"
18 #include "lldb/Symbol/LineEntry.h"
19 #include "lldb/Utility/Iterable.h"
20 #include "lldb/lldb-private.h"
21 
22 namespace lldb_private {
23 
24 class SymbolContextScope;
25 
26 /// \class SymbolContext SymbolContext.h "lldb/Symbol/SymbolContext.h" Defines
27 /// a symbol context baton that can be handed other debug core functions.
28 ///
29 /// Many debugger functions require a context when doing lookups. This class
30 /// provides a common structure that can be used as the result of a query that
31 /// can contain a single result. Examples of such queries include
32 /// \li Looking up a load address.
34 public:
35  /// Default constructor.
36  ///
37  /// Initialize all pointer members to nullptr and all struct members to
38  /// their default state.
39  SymbolContext();
40 
41  /// Construct with an object that knows how to reconstruct its symbol
42  /// context.
43  ///
44  /// \param[in] sc_scope
45  /// A symbol context scope object that knows how to reconstruct
46  /// it's context.
47  explicit SymbolContext(SymbolContextScope *sc_scope);
48 
49  /// Construct with module, and optional compile unit, function, block, line
50  /// table, line entry and symbol.
51  ///
52  /// Initialize all pointer to the specified values.
53  ///
54  /// \param[in] module_sp
55  /// A Module pointer to the module for this context.
56  ///
57  /// \param[in] comp_unit
58  /// A CompileUnit pointer to the compile unit for this context.
59  ///
60  /// \param[in] function
61  /// A Function pointer to the function for this context.
62  ///
63  /// \param[in] block
64  /// A Block pointer to the deepest block for this context.
65  ///
66  /// \param[in] line_entry
67  /// A LineEntry pointer to the line entry for this context.
68  ///
69  /// \param[in] symbol
70  /// A Symbol pointer to the symbol for this context.
71  explicit SymbolContext(const lldb::TargetSP &target_sp,
72  const lldb::ModuleSP &module_sp,
73  CompileUnit *comp_unit = nullptr,
74  Function *function = nullptr, Block *block = nullptr,
75  LineEntry *line_entry = nullptr,
76  Symbol *symbol = nullptr);
77 
78  // This version sets the target to a NULL TargetSP if you don't know it.
79  explicit SymbolContext(const lldb::ModuleSP &module_sp,
80  CompileUnit *comp_unit = nullptr,
81  Function *function = nullptr, Block *block = nullptr,
82  LineEntry *line_entry = nullptr,
83  Symbol *symbol = nullptr);
84 
86 
87  /// Clear the object's state.
88  ///
89  /// Resets all pointer members to nullptr, and clears any class objects to
90  /// their default state.
91  void Clear(bool clear_target);
92 
93  /// Dump a description of this object to a Stream.
94  ///
95  /// Dump a description of the contents of this object to the supplied stream
96  /// \a s.
97  ///
98  /// \param[in] s
99  /// The stream to which to dump the object description.
100  void Dump(Stream *s, Target *target) const;
101 
102  /// Dump the stop context in this object to a Stream.
103  ///
104  /// Dump the best description of this object to the stream. The information
105  /// displayed depends on the amount and quality of the information in this
106  /// context. If a module, function, file and line number are available, they
107  /// will be dumped. If only a module and function or symbol name with offset
108  /// is available, that will be output. Else just the address at which the
109  /// target was stopped will be displayed.
110  ///
111  /// \param[in] s
112  /// The stream to which to dump the object description.
113  ///
114  /// \param[in] so_addr
115  /// The resolved section offset address.
116  ///
117  /// \param[in] show_fullpaths
118  /// When printing file paths (with the Module), whether the
119  /// base name of the Module should be printed or the full path.
120  ///
121  /// \param[in] show_module
122  /// Whether the module name should be printed followed by a
123  /// grave accent "`" character.
124  ///
125  /// \param[in] show_inlined_frames
126  /// If a given pc is in inlined function(s), whether the inlined
127  /// functions should be printed on separate lines in addition to
128  /// the concrete function containing the pc.
129  ///
130  /// \param[in] show_function_arguments
131  /// If false, this method will try to elide the function argument
132  /// types when printing the function name. This may be ambiguous
133  /// for languages that have function overloading - but it may
134  /// make the "function name" too long to include all the argument
135  /// types.
136  ///
137  /// \param[in] show_function_name
138  /// Normally this should be true - the function/symbol name should
139  /// be printed. In disassembly formatting, where we want a format
140  /// like "<*+36>", this should be false and "*" will be printed
141  /// instead.
142  ///
143  /// \param[in] show_inline_callsite_line_info
144  /// When processing an inline block, the line info of the callsite
145  /// is dumped if this flag is \b true, otherwise the line info
146  /// of the actual inlined function is dumped.
147  ///
148  /// \return
149  /// \b true if some text was dumped, \b false otherwise.
150  bool DumpStopContext(Stream *s, ExecutionContextScope *exe_scope,
151  const Address &so_addr, bool show_fullpaths,
152  bool show_module, bool show_inlined_frames,
153  bool show_function_arguments,
154  bool show_function_name) const;
155 
156  /// Get the address range contained within a symbol context.
157  ///
158  /// Address range priority is as follows:
159  /// - line_entry address range if line_entry is valid and
160  /// eSymbolContextLineEntry is set in \a scope
161  /// - block address range if block is not nullptr and eSymbolContextBlock
162  /// is set in \a scope
163  /// - function address range if function is not nullptr and
164  /// eSymbolContextFunction is set in \a scope
165  /// - symbol address range if symbol is not nullptr and
166  /// eSymbolContextSymbol is set in \a scope
167  ///
168  /// \param[in] scope
169  /// A mask of symbol context bits telling this function which
170  /// address ranges it can use when trying to extract one from
171  /// the valid (non-nullptr) symbol context classes.
172  ///
173  /// \param[in] range_idx
174  /// The address range index to grab. Since many functions and
175  /// blocks are not always contiguous, they may have more than
176  /// one address range.
177  ///
178  /// \param[in] use_inline_block_range
179  /// If \a scope has the eSymbolContextBlock bit set, and there
180  /// is a valid block in the symbol context, return the block
181  /// address range for the containing inline function block, not
182  /// the deepest most block. This allows us to extract information
183  /// for the address range of the inlined function block, not
184  /// the deepest lexical block.
185  ///
186  /// \param[out] range
187  /// An address range object that will be filled in if \b true
188  /// is returned.
189  ///
190  /// \return
191  /// \b True if this symbol context contains items that describe
192  /// an address range, \b false otherwise.
193  bool GetAddressRange(uint32_t scope, uint32_t range_idx,
194  bool use_inline_block_range, AddressRange &range) const;
195 
197  Status &error);
198 
199  /// Find the best global data symbol visible from this context.
200  ///
201  /// Symbol priority is:
202  /// - extern symbol in the current module if there is one
203  /// - non-extern symbol in the current module if there is one
204  /// - extern symbol in the target
205  /// - non-extern symbol in the target
206  /// It is an error if the highest-priority result is ambiguous.
207  ///
208  /// \param[in] name
209  /// The name of the symbol to search for.
210  ///
211  /// \param[out] error
212  /// An error that will be populated with a message if there was an
213  /// ambiguous result. The error will not be populated if no result
214  /// was found.
215  ///
216  /// \return
217  /// The symbol that was found, or \b nullptr if none was found.
219 
221  Target *target) const;
222 
223  uint32_t GetResolvedMask() const;
224 
226 
227  /// Find a block that defines the function represented by this symbol
228  /// context.
229  ///
230  /// If this symbol context points to a block that is an inlined function, or
231  /// is contained within an inlined function, the block that defines the
232  /// inlined function is returned.
233  ///
234  /// If this symbol context has no block in it, or the block is not itself an
235  /// inlined function block or contained within one, we return the top level
236  /// function block.
237  ///
238  /// This is a handy function to call when you want to get the block whose
239  /// variable list will include the arguments for the function that is
240  /// represented by this symbol context (whether the function is an inline
241  /// function or not).
242  ///
243  /// \return
244  /// The block object pointer that defines the function that is
245  /// represented by this symbol context object, nullptr otherwise.
247 
248  /// If this symbol context represents a function that is a method, return
249  /// true and provide information about the method.
250  ///
251  /// \param[out] language
252  /// If \b true is returned, the language for the method.
253  ///
254  /// \param[out] is_instance_method
255  /// If \b true is returned, \b true if this is a instance method,
256  /// \b false if this is a static/class function.
257  ///
258  /// \param[out] language_object_name
259  /// If \b true is returned, the name of the artificial variable
260  /// for the language ("this" for C++, "self" for ObjC).
261  ///
262  /// \return
263  /// \b True if this symbol context represents a function that
264  /// is a method of a class, \b false otherwise.
266  bool &is_instance_method,
267  ConstString &language_object_name);
268 
269  /// Sorts the types in TypeMap according to SymbolContext to TypeList
270  ///
271  void SortTypeList(TypeMap &type_map, TypeList &type_list) const;
272 
273  /// Find a name of the innermost function for the symbol context.
274  ///
275  /// For instance, if the symbol context contains an inlined block, it will
276  /// return the inlined function name.
277  ///
278  /// \return
279  /// The name of the function represented by this symbol context.
281  Mangled::NamePreference preference = Mangled::ePreferDemangled) const;
282 
283  /// Get the line entry that corresponds to the function.
284  ///
285  /// If the symbol context contains an inlined block, the line entry for the
286  /// start address of the inlined function will be returned, otherwise the
287  /// line entry for the start address of the function will be returned. This
288  /// can be used after doing a Module::FindFunctions(...) or
289  /// ModuleList::FindFunctions(...) call in order to get the correct line
290  /// table information for the symbol context. it will return the inlined
291  /// function name.
293 
294  /// Find the block containing the inlined block that contains this block.
295  ///
296  /// For instance, if the symbol context contains an inlined block, it will
297  /// return the inlined function name.
298  ///
299  /// \param[in] curr_frame_pc
300  /// The address within the block of this object.
301  ///
302  /// \param[out] next_frame_sc
303  /// A new symbol context that does what the title says it does.
304  ///
305  /// \param[out] inlined_frame_addr
306  /// This is what you should report as the PC in \a next_frame_sc.
307  ///
308  /// \return
309  /// \b true if this SymbolContext specifies a block contained in an
310  /// inlined block. If this returns \b true, \a next_frame_sc and
311  /// \a inlined_frame_addr will be filled in correctly.
312  bool GetParentOfInlinedScope(const Address &curr_frame_pc,
313  SymbolContext &next_frame_sc,
314  Address &inlined_frame_addr) const;
315 
316  // Member variables
317  lldb::TargetSP target_sp; ///< The Target for a given query
318  lldb::ModuleSP module_sp; ///< The Module for a given query
319  CompileUnit *comp_unit = nullptr; ///< The CompileUnit for a given query
320  Function *function = nullptr; ///< The Function for a given query
321  Block *block = nullptr; ///< The Block for a given query
322  LineEntry line_entry; ///< The LineEntry for a given query
323  Symbol *symbol = nullptr; ///< The Symbol for a given query
325  nullptr; ///< The global variable matching the given query
326 };
327 
329 public:
333  eFileSpecified = 1 << 1,
339  };
340 
341  // This one produces a specifier that matches everything...
342  SymbolContextSpecifier(const lldb::TargetSP &target_sp);
343 
345 
346  bool AddSpecification(const char *spec_string, SpecificationType type);
347 
348  bool AddLineSpecification(uint32_t line_no, SpecificationType type);
349 
350  void Clear();
351 
352  bool SymbolContextMatches(const SymbolContext &sc);
353 
354  bool AddressMatches(lldb::addr_t addr);
355 
356  void GetDescription(Stream *s, lldb::DescriptionLevel level) const;
357 
358 private:
359  lldb::TargetSP m_target_sp;
361  lldb::ModuleSP m_module_sp;
362  std::unique_ptr<FileSpec> m_file_spec_up;
363  size_t m_start_line;
364  size_t m_end_line;
367  std::unique_ptr<AddressRange> m_address_range_up;
368  uint32_t m_type; // Or'ed bits from SpecificationType
369 };
370 
371 /// \class SymbolContextList SymbolContext.h "lldb/Symbol/SymbolContext.h"
372 /// Defines a list of symbol context objects.
373 ///
374 /// This class provides a common structure that can be used to contain the
375 /// result of a query that can contain a multiple results. Examples of such
376 /// queries include:
377 /// \li Looking up a function by name.
378 /// \li Finding all addresses for a specified file and line number.
380 public:
381  /// Default constructor.
382  ///
383  /// Initialize with an empty list.
385 
386  /// Destructor.
388 
389  /// Append a new symbol context to the list.
390  ///
391  /// \param[in] sc
392  /// A symbol context to append to the list.
393  void Append(const SymbolContext &sc);
394 
395  void Append(const SymbolContextList &sc_list);
396 
397  bool AppendIfUnique(const SymbolContext &sc, bool merge_symbol_into_function);
398 
400  bool merge_symbol_into_function);
401 
402  /// Clear the object's state.
403  ///
404  /// Clears the symbol context list.
405  void Clear();
406 
407  /// Dump a description of this object to a Stream.
408  ///
409  /// Dump a description of the contents of each symbol context in the list to
410  /// the supplied stream \a s.
411  ///
412  /// \param[in] s
413  /// The stream to which to dump the object description.
414  void Dump(Stream *s, Target *target) const;
415 
416  /// Get accessor for a symbol context at index \a idx.
417  ///
418  /// Dump a description of the contents of each symbol context in the list to
419  /// the supplied stream \a s.
420  ///
421  /// \param[in] idx
422  /// The zero based index into the symbol context list.
423  ///
424  /// \param[out] sc
425  /// A reference to the symbol context to fill in.
426  ///
427  /// \return
428  /// Returns \b true if \a idx was a valid index into this
429  /// symbol context list and \a sc was filled in, \b false
430  /// otherwise.
431  bool GetContextAtIndex(size_t idx, SymbolContext &sc) const;
432 
433  /// Direct reference accessor for a symbol context at index \a idx.
434  ///
435  /// The index \a idx must be a valid index, no error checking will be done
436  /// to ensure that it is valid.
437  ///
438  /// \param[in] idx
439  /// The zero based index into the symbol context list.
440  ///
441  /// \return
442  /// A const reference to the symbol context to fill in.
443  SymbolContext &operator[](size_t idx) { return m_symbol_contexts[idx]; }
444 
445  const SymbolContext &operator[](size_t idx) const {
446  return m_symbol_contexts[idx];
447  }
448 
449  bool RemoveContextAtIndex(size_t idx);
450 
451  /// Get accessor for a symbol context list size.
452  ///
453  /// \return
454  /// Returns the number of symbol context objects in the list.
455  uint32_t GetSize() const;
456 
457  bool IsEmpty() const;
458 
460 
462  Target *target) const;
463 
464 protected:
465  typedef std::vector<SymbolContext>
466  collection; ///< The collection type for the list.
467 
468  // Member variables.
469  collection m_symbol_contexts; ///< The list of symbol contexts.
470 
471 public:
476  }
477 };
478 
479 bool operator==(const SymbolContext &lhs, const SymbolContext &rhs);
480 bool operator!=(const SymbolContext &lhs, const SymbolContext &rhs);
481 
482 bool operator==(const SymbolContextList &lhs, const SymbolContextList &rhs);
483 bool operator!=(const SymbolContextList &lhs, const SymbolContextList &rhs);
484 
485 } // namespace lldb_private
486 
487 #endif // LLDB_SYMBOL_SYMBOLCONTEXT_H
lldb_private::SymbolContextSpecifier::~SymbolContextSpecifier
~SymbolContextSpecifier()
lldb_private::SymbolContext::block
Block * block
The Block for a given query.
Definition: SymbolContext.h:321
lldb_private::SymbolContext::comp_unit
CompileUnit * comp_unit
The CompileUnit for a given query.
Definition: SymbolContext.h:319
lldb_private::SymbolContextSpecifier::AddSpecification
bool AddSpecification(const char *spec_string, SpecificationType type)
Definition: SymbolContext.cpp:952
Mangled.h
lldb_private::SymbolContextList::operator[]
const SymbolContext & operator[](size_t idx) const
Definition: SymbolContext.h:445
lldb_private::SymbolContextSpecifier::eNothingSpecified
@ eNothingSpecified
Definition: SymbolContext.h:331
lldb_private::SymbolContextSpecifier::eLineEndSpecified
@ eLineEndSpecified
Definition: SymbolContext.h:335
lldb_private::SymbolContextSpecifier::m_type
uint32_t m_type
Definition: SymbolContext.h:368
lldb_private::SymbolContextList::~SymbolContextList
~SymbolContextList()
Destructor.
lldb_private::SymbolContextSpecifier::m_module_spec
std::string m_module_spec
Definition: SymbolContext.h:360
lldb_private::Symbol
Definition: Symbol.h:20
lldb_private::SymbolContextSpecifier::m_function_spec
std::string m_function_spec
Definition: SymbolContext.h:365
lldb_private::SymbolContext::GetAddressRange
bool GetAddressRange(uint32_t scope, uint32_t range_idx, bool use_inline_block_range, AddressRange &range) const
Get the address range contained within a symbol context.
Definition: SymbolContext.cpp:379
lldb_private::SymbolContext::target_sp
lldb::TargetSP target_sp
The Target for a given query.
Definition: SymbolContext.h:317
lldb_private::SymbolContextSpecifier::eFileSpecified
@ eFileSpecified
Definition: SymbolContext.h:333
lldb_private::SymbolContextList::Append
void Append(const SymbolContext &sc)
Append a new symbol context to the list.
Definition: SymbolContext.cpp:1188
lldb_private::SymbolContextList::SymbolContextIterable
AdaptedIterable< collection, SymbolContext, vector_adapter > SymbolContextIterable
Definition: SymbolContext.h:473
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::SymbolContextList::GetContextAtIndex
bool GetContextAtIndex(size_t idx, SymbolContext &sc) const
Get accessor for a symbol context at index idx.
Definition: SymbolContext.cpp:1262
lldb_private::SymbolContextSpecifier::Clear
void Clear()
Definition: SymbolContext.cpp:1003
lldb_private::AdaptedIterable
Definition: Iterable.h:153
lldb_private::SymbolContextSpecifier::AddLineSpecification
bool AddLineSpecification(uint32_t line_no, SpecificationType type)
Definition: SymbolContext.cpp:930
lldb_private::Stream
Definition: Stream.h:28
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::SymbolContext::~SymbolContext
~SymbolContext()
lldb_private::SymbolContext::SortTypeList
void SortTypeList(TypeMap &type_map, TypeList &type_list) const
Sorts the types in TypeMap according to SymbolContext to TypeList.
Definition: SymbolContext.cpp:560
lldb_private::SymbolContextSpecifier::eLineStartSpecified
@ eLineStartSpecified
Definition: SymbolContext.h:334
lldb_private::SymbolContextSpecifier::SymbolContextSpecifier
SymbolContextSpecifier(const lldb::TargetSP &target_sp)
Definition: SymbolContext.cpp:923
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::Target
Definition: Target.h:451
lldb_private::SymbolContextList::Clear
void Clear()
Clear the object's state.
Definition: SymbolContext.cpp:1244
lldb_private::SymbolContextSpecifier::eFunctionSpecified
@ eFunctionSpecified
Definition: SymbolContext.h:336
lldb_private::SymbolContextList::SymbolContextList
SymbolContextList()
Default constructor.
Definition: SymbolContext.cpp:1184
lldb_private::CompileUnit
Definition: CompileUnit.h:38
lldb_private::SymbolContextSpecifier::eClassOrNamespaceSpecified
@ eClassOrNamespaceSpecified
Definition: SymbolContext.h:337
lldb_private::SymbolContextSpecifier::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
Definition: SymbolContext.cpp:1115
lldb_private::SymbolContextList::Dump
void Dump(Stream *s, Target *target) const
Dump a description of this object to a Stream.
Definition: SymbolContext.cpp:1246
lldb_private::SymbolContextSpecifier::m_class_name
std::string m_class_name
Definition: SymbolContext.h:366
lldb_private::operator==
bool operator==(const Address &lhs, const Address &rhs)
Definition: Address.cpp:999
lldb_private::SymbolContextSpecifier::m_module_sp
lldb::ModuleSP m_module_sp
Definition: SymbolContext.h:361
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::SymbolContext::symbol
Symbol * symbol
The Symbol for a given query.
Definition: SymbolContext.h:323
lldb_private::Function
Definition: Function.h:413
lldb_private::SymbolContext::DumpStopContext
bool DumpStopContext(Stream *s, ExecutionContextScope *exe_scope, const Address &so_addr, bool show_fullpaths, bool show_module, bool show_inlined_frames, bool show_function_arguments, bool show_function_name) const
Dump the stop context in this object to a Stream.
Definition: SymbolContext.cpp:67
lldb_private::SymbolContextSpecifier
Definition: SymbolContext.h:328
lldb_private::ExecutionContextScope
Definition: ExecutionContextScope.h:32
lldb_private::SymbolContext::Dump
void Dump(Stream *s, Target *target) const
Dump a description of this object to a Stream.
Definition: SymbolContext.cpp:305
lldb_private::SymbolContext::GetFunctionStartLineEntry
LineEntry GetFunctionStartLineEntry() const
Get the line entry that corresponds to the function.
Definition: SymbolContext.cpp:674
lldb_private::SymbolContextSpecifier::m_address_range_up
std::unique_ptr< AddressRange > m_address_range_up
Definition: SymbolContext.h:367
LineEntry.h
lldb_private::SymbolContextSpecifier::AddressMatches
bool AddressMatches(lldb::addr_t addr)
Definition: SymbolContext.cpp:1102
lldb_private::SymbolContextList::GetSize
uint32_t GetSize() const
Get accessor for a symbol context list size.
Definition: SymbolContext.cpp:1278
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::SymbolContextSpecifier::m_file_spec_up
std::unique_ptr< FileSpec > m_file_spec_up
Definition: SymbolContext.h:362
lldb_private::AddressRange
Definition: AddressRange.h:25
lldb_private::SymbolContext::GetFunctionName
ConstString GetFunctionName(Mangled::NamePreference preference=Mangled::ePreferDemangled) const
Find a name of the innermost function for the symbol context.
Definition: SymbolContext.cpp:653
lldb_private::SymbolContextSpecifier::m_start_line
size_t m_start_line
Definition: SymbolContext.h:363
lldb_private::SymbolContext::GetFunctionBlock
Block * GetFunctionBlock()
Find a block that defines the function represented by this symbol context.
Definition: SymbolContext.cpp:521
lldb_private::SymbolContextList::m_symbol_contexts
collection m_symbol_contexts
The list of symbol contexts.
Definition: SymbolContext.h:469
lldb_private::SymbolContextList::AppendIfUnique
bool AppendIfUnique(const SymbolContext &sc, bool merge_symbol_into_function)
Definition: SymbolContext.cpp:1209
lldb_private::SymbolContext::variable
Variable * variable
The global variable matching the given query.
Definition: SymbolContext.h:324
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::SymbolContextSpecifier::m_target_sp
lldb::TargetSP m_target_sp
Definition: SymbolContext.h:359
lldb_private::SymbolContextList::collection
std::vector< SymbolContext > collection
The collection type for the list.
Definition: SymbolContext.h:466
Address.h
lldb_private::SymbolContextList::NumLineEntriesWithLine
uint32_t NumLineEntriesWithLine(uint32_t line) const
Definition: SymbolContext.cpp:1282
lldb_private::TypeMap
Definition: TypeMap.h:20
lldb_private::operator!=
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1005
lldb_private::SymbolContextScope
Definition: SymbolContextScope.h:64
lldb_private::SymbolContext::FindBestGlobalDataSymbol
const Symbol * FindBestGlobalDataSymbol(ConstString name, Status &error)
Find the best global data symbol visible from this context.
Definition: SymbolContext.cpp:762
lldb-private.h
lldb_private::SymbolContext::SymbolContext
SymbolContext()
Default constructor.
Definition: SymbolContext.cpp:28
Iterable.h
lldb_private::SymbolContextSpecifier::eModuleSpecified
@ eModuleSpecified
Definition: SymbolContext.h:332
lldb_private::SymbolContextSpecifier::m_end_line
size_t m_end_line
Definition: SymbolContext.h:364
lldb_private::Status
Definition: Status.h:44
lldb_private::Block
Definition: Block.h:41
lldb_private::SymbolContext::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level, Target *target) const
Definition: SymbolContext.cpp:185
uint32_t
lldb_private::SymbolContextList::SymbolContexts
SymbolContextIterable SymbolContexts()
Definition: SymbolContext.h:474
lldb_private::Address
Definition: Address.h:59
lldb_private::SymbolContext::GetFunctionMethodInfo
bool GetFunctionMethodInfo(lldb::LanguageType &language, bool &is_instance_method, ConstString &language_object_name)
If this symbol context represents a function that is a method, return true and provide information ab...
Definition: SymbolContext.cpp:545
lldb_private::SymbolContext::GetResolvedMask
uint32_t GetResolvedMask() const
Definition: SymbolContext.cpp:284
lldb_private::SymbolContextSpecifier::eAddressRangeSpecified
@ eAddressRangeSpecified
Definition: SymbolContext.h:338
lldb_private::SymbolContext::GetParentOfInlinedScope
bool GetParentOfInlinedScope(const Address &curr_frame_pc, SymbolContext &next_frame_sc, Address &inlined_frame_addr) const
Find the block containing the inlined block that contains this block.
Definition: SymbolContext.cpp:436
lldb_private::SymbolContext::module_sp
lldb::ModuleSP module_sp
The Module for a given query.
Definition: SymbolContext.h:318
lldb_private::SymbolContextList::IsEmpty
bool IsEmpty() const
Definition: SymbolContext.cpp:1280
lldb_private::SymbolContextSpecifier::SpecificationType
SpecificationType
Definition: SymbolContext.h:330
lldb_private::SymbolContext::Clear
void Clear(bool clear_target)
Clear the object's state.
Definition: SymbolContext.cpp:55
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::SymbolContext::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: SymbolContext.cpp:417
lldb_private::TypeList
Definition: TypeList.h:20
lldb_private::Variable
Definition: Variable.h:25
lldb_private::SymbolContext::line_entry
LineEntry line_entry
The LineEntry for a given query.
Definition: SymbolContext.h:322
lldb_private::SymbolContextList::GetDescription
void GetDescription(Stream *s, lldb::DescriptionLevel level, Target *target) const
Definition: SymbolContext.cpp:1292
lldb_private::SymbolContext::GetAddressRangeFromHereToEndLine
bool GetAddressRangeFromHereToEndLine(uint32_t end_line, AddressRange &range, Status &error)
Definition: SymbolContext.cpp:697
lldb_private::LineEntry
Definition: LineEntry.h:20
lldb_private::SymbolContextSpecifier::SymbolContextMatches
bool SymbolContextMatches(const SymbolContext &sc)
Definition: SymbolContext.cpp:1015
lldb_private::SymbolContextList::operator[]
SymbolContext & operator[](size_t idx)
Direct reference accessor for a symbol context at index idx.
Definition: SymbolContext.h:443
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
lldb_private::SymbolContextList::RemoveContextAtIndex
bool RemoveContextAtIndex(size_t idx)
Definition: SymbolContext.cpp:1270