[lldb-dev] Bug in OptionValuePathMappings::SetValueFromString

Zachary Turner via lldb-dev lldb-dev at lists.llvm.org
Fri Nov 18 13:07:43 PST 2016


Also, I just noticed the loop only runs one time, so it appears equivalent
to

m_path_mappings.Remove(remove_indexes.size() - 1, m_notify_changes);

which seems completely wrong

On Fri, Nov 18, 2016 at 1:05 PM Zachary Turner <zturner at google.com> wrote:

> In the switch / case handler for eVarSetOperationRemove, there is the
> following code:
>
>       if (num_remove_indexes) {
>         // Sort and then erase in reverse so indexes are always valid
>         std::sort(remove_indexes.begin(), remove_indexes.end());
>         for (size_t j = num_remove_indexes - 1; j < num_remove_indexes;
> ++j) {
>           m_path_mappings.Remove(j, m_notify_changes);
>         }
>       }
>
> Should the line that calls Remove() not be like this:
>
>           m_path_mappings.Remove(*remove_indexes[j]*, m_notify_changes);
>
> ?  What effect will this have on LLDB?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20161118/8154f40f/attachment.html>


More information about the lldb-dev mailing list