[Lldb-commits] [PATCH] D12804: Fix several issues around dwo symbol file handling
Tamas Berghammer via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 14 10:19:02 PDT 2015
tberghammer added inline comments.
Comment at: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp:2242-2248
@@ -2241,2 +2241,9 @@
lldb::addr_t highest_func_addr = func_ranges.GetMaxRangeEnd (0);
+ // lowest_func_addr is a file address what can't be 0 because at address 0 we should have the
+ // file header. It is 0 if the linker optimized out the given function when we don't want to
+ // return an invalid function object.
+ if (lowest_func_addr == 0)
+ return nullptr;
if (lowest_func_addr != LLDB_INVALID_ADDRESS && lowest_func_addr <= highest_func_addr)
> This actually can be zero for functions in a .o file. So this must be removed or you must fix it in a different way.
Is there any case when the code is executed from the object file directly and not from the shared library? On Linux I am pretty sure it can't happen, but I am not sure about OSX.
If the function is executed from the shared library then the lowest_func_addr should be already offsetted by the object file base address at this point
More information about the lldb-commits