[Lldb-commits] [lldb] [lldb] Use the first address range as the function address (PR #122440)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 10 08:04:39 PST 2025


================
@@ -428,7 +428,7 @@ class Function : public UserID, public SymbolContextScope {
   ///     The section offset based address for this function.
   Function(CompileUnit *comp_unit, lldb::user_id_t func_uid,
            lldb::user_id_t func_type_uid, const Mangled &mangled,
-           Type *func_type, AddressRanges ranges);
+           Type *func_type, Address address, AddressRanges ranges);
----------------
DavidSpickett wrote:

DWARF expects the function entry point to be the start of the first range. So if all we supported was DWARF, this could just take the ranges and read the entry point from those, right?

However, we support more than DWARF (and maybe we create arbitrary function objects in some scenarios?), so we do not assume here that we can always use the start of the first range.

Is that right?

https://github.com/llvm/llvm-project/pull/122440


More information about the lldb-commits mailing list