[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jan 20 04:13:26 PST 2025


================
@@ -192,6 +192,33 @@ class SymbolContext {
   bool GetAddressRange(uint32_t scope, uint32_t range_idx,
                        bool use_inline_block_range, AddressRange &range) const;
 
+  /// Get the address represented by this symbol context.
+  ///
+  /// The exact meaning of the address depends on object being queried and the
+  /// flags. Priority is as follows:
+  ///     - The beginning (lowest address) of the line_entry if line_entry is
+  ///     valid and eSymbolContextLineEntry is set in \a scope
+  ///     - The beginning of the block if block is not nullptr and
+  ///     eSymbolContextBlock is set in \a scope
+  ///     - function address (entry point) if function is not nullptr and
+  ///     eSymbolContextFunction is set in \a scope
+  ///     - symbol address if symbol is not nullptr and eSymbolContextSymbol is
+  ///     set in \a scope
+  ///
+  /// \param[in] scope
+  ///     A mask of symbol context bits telling this function which
----------------
labath wrote:

I'm not sure what you mean. The individual bits and their meaning is listed in the paragraph above this. I don't think it makes sense to repeat them here. I could move the whole paragraph here, but I'm just following the pattern of `GetAddressRange`

https://github.com/llvm/llvm-project/pull/123340


More information about the lldb-commits mailing list