[Lldb-commits] [lldb] [lldb] Add DWARFExpressionEntry and GetExpressionEntryAtAddress() to … (PR #144238)
Adrian Prantl via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 30 09:33:19 PDT 2025
================
@@ -53,6 +54,30 @@ bool DWARFExpressionList::ContainsAddress(lldb::addr_t func_load_addr,
return GetExpressionAtAddress(func_load_addr, addr) != nullptr;
}
+std::optional<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;
+
+ // translate to file-relative PC
----------------
adrian-prantl wrote:
```suggestion
// Translate to file-relative PC.
```
https://github.com/llvm/llvm-project/pull/144238
More information about the lldb-commits
mailing list