ADodds created this revision.
ADodds added a reviewer: clayborg.
ADodds added a subscriber: lldb-commits.
ADodds set the repository for this revision to rL LLVM.
This patch fixes a bug in SymbolFileDWARF::FindFunctions(), where functions may
not be correctly found when appending to a list already containing some symbols.
Upon entering this function, original_size is set to the size of sc_list,
however the target code should be executed not when the list is empty but when
this list has not grown during this function invocation. This patch corrects
this problem.
Running the lldb test suite shows no regressions caused by this change, and
fixes Bug 25433.
https://llvm.org/bugs/show_bug.cgi?id=25433
Repository:
rL LLVM
http://reviews.llvm.org/D14538
Files:
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2711,7 +2711,7 @@
// TODO: The arch in the object file isn't correct for MSVC
// binaries on windows, we should find a way to make it
// correct and handle those symbols as well.
- if (sc_list.GetSize() == 0)
+ if (sc_list.GetSize() == original_size)
{
ArchSpec arch;
if (!parent_decl_ctx &&
Index: source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -2711,7 +2711,7 @@
// TODO: The arch in the object file isn't correct for MSVC
// binaries on windows, we should find a way to make it
// correct and handle those symbols as well.
- if (sc_list.GetSize() == 0)
+ if (sc_list.GetSize() == original_size)
{
ArchSpec arch;
if (!parent_decl_ctx &&
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits