I was going through doing some routine StringRef changes and I ran across this function:
std::lock_guard<std::recursive_mutex> guard(m_mutex); assert(GetStackID() == prev_frame.GetStackID()); // TODO: remove this after some testing m_variable_list_sp = prev_frame.m_variable_list_sp; m_variable_list_value_objects.Swap(prev_frame.m_variable_list_value_objects); if (!m_disassembly.GetString().empty()) { m_disassembly.Clear(); * m_disassembly.GetString().swap(m_disassembly.GetString());* } Either I'm crazy or that bolded line is a bug. Is it supposed to be prev_frame.m_disassembly.GetString()? What would the implications of this bug be? i.e. how can we write a test for this? Also, as a matter of curiosity, why is it swapping? That means it's modifying the input frame, when it seems like it really should just be modifying the current frame.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev