================ @@ -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; + } + } ---------------- labath wrote:
Okay, please take a look at the new version. I had to inline the old implementation into one place (CommandObjectTarget, for `image lookup`), but generally, I think this looks better than what I expected. https://github.com/llvm/llvm-project/pull/123340 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits