[Lldb-commits] [lldb] [lldb] Add SymbolContext::GetAddress (PR #123340)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 17 10:06:35 PST 2025
================
@@ -370,6 +370,31 @@ bool SymbolContext::GetAddressRange(uint32_t scope, uint32_t range_idx,
return false;
}
+Address SymbolContext::GetAddress(uint32_t scope,
+ bool use_inline_block_range) const {
+ if ((scope & eSymbolContextLineEntry) && line_entry.IsValid())
+ return line_entry.range.GetBaseAddress();
+
+ if (scope & eSymbolContextBlock) {
+ Block *block_to_use = (block && use_inline_block_range)
+ ? block->GetContainingInlinedBlock()
+ : block;
+ if (block_to_use) {
+ Address addr;
+ block_to_use->GetStartAddress(addr);
+ return addr;
+ }
+ }
----------------
jimingham wrote:
Can you say a little bit more why this concerns you? I can't see either of these queries as being terribly useful, but you are answering the question that was asked correctly.
https://github.com/llvm/llvm-project/pull/123340
More information about the lldb-commits
mailing list