[Lldb-commits] [lldb] [lldb] Add Function::GetAddress and redirect some uses (PR #115836)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 9 02:38:03 PST 2025
================
@@ -407,6 +406,15 @@ CompileUnit *Function::GetCompileUnit() { return m_comp_unit; }
const CompileUnit *Function::GetCompileUnit() const { return m_comp_unit; }
+Address Function::GetAddress() const {
+ if (m_ranges.empty())
+ return Address();
+ // We're using a (DWARF-like) convention where the base address of the first
+ // interval denotes the entry point of the function. If that turns out to be
+ // insufficient, we can introduce a separate "entry point address" field.
+ return m_ranges[0].GetBaseAddress();
----------------
labath wrote:
Finally got back to this. The main change is that the Function class now has a separate member for the function address. Right now it's still the lowest function address, but in the next patch I'll change it to pass the function address explicitly (and independently of the sorted ranges of the function).
https://github.com/llvm/llvm-project/pull/115836
More information about the lldb-commits
mailing list