================ @@ -53,6 +54,29 @@ bool DWARFExpressionList::ContainsAddress(lldb::addr_t func_load_addr, return GetExpressionAtAddress(func_load_addr, addr) != nullptr; } +llvm::Expected<DWARFExpressionList::DWARFExpressionEntry> +DWARFExpressionList::GetExpressionEntryAtAddress(lldb::addr_t func_load_addr, + lldb::addr_t load_addr) const { + if (const DWARFExpression *always = GetAlwaysValidExpr()) { + AddressRange full_range(m_func_file_addr, /*size=*/LLDB_INVALID_ADDRESS); + return DWARFExpressionEntry{full_range, always}; + } + + if (func_load_addr == LLDB_INVALID_ADDRESS) + func_load_addr = m_func_file_addr; + lldb::addr_t file_pc = load_addr - func_load_addr + m_func_file_addr; + + uint32_t idx = m_exprs.FindEntryIndexThatContains(file_pc); ---------------- adrian-prantl wrote:
why not use ``` const Entry *FindEntryThatContains(B addr) const { ```? https://github.com/llvm/llvm-project/pull/144238 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits