Page MenuHomePhabricator

Fix DwarfSymbolFile when appending global functions from different modules

Authored by ADodds on Nov 10 2015, 4:26 AM.



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.

Diff Detail


Event Timeline

ADodds updated this revision to Diff 39802.Nov 10 2015, 4:26 AM
ADodds retitled this revision from to Fix DwarfSymbolFile when appending global functions from different modules.
ADodds updated this object.
ADodds added a reviewer: clayborg.
ADodds set the repository for this revision to rL LLVM.
ADodds added a subscriber: lldb-commits.
tberghammer accepted this revision.Nov 10 2015, 4:32 AM
tberghammer added a reviewer: tberghammer.
tberghammer added a subscriber: tberghammer.

Looks good (I remember fixing some similar issues in SymbolFileDWARF where we specify append=true, but I missed this one)

This revision is now accepted and ready to land.Nov 10 2015, 4:32 AM
This revision was automatically updated to reflect the committed changes.