Index: tools/lldb-mi/MICmdCmdBreak.cpp =================================================================== --- tools/lldb-mi/MICmdCmdBreak.cpp +++ tools/lldb-mi/MICmdCmdBreak.cpp @@ -172,11 +172,19 @@ CMIUtilString strFileFn; CMIUtilString rStrLineOrFn; // Full path in windows can have : after drive letter. So look for the - // last colon - const size_t nPosColon = m_brkName.find_last_of(cColon); - if (nPosColon != std::string::npos) + // last colon, and make sure it isn't the C++ namespace token '::' + // as in 'ns::func'. If we have 'file:::func', we'll want to parse it + // as 'file' + ':' + '::func'. + size_t nPosColon = m_brkName.find_last_of(cColon); + if (nPosColon != std::string::npos && + ((nPosColon > 1 && m_brkName[nPosColon - 1] != ':') || + (nPosColon > 2 && m_brkName[nPosColon - 2] == ':'))) { - // extract file name and line number from it + // Backup 2 if we had 'file:::func' + if (nPosColon > 2 && + m_brkName[nPosColon - 1] == ':' && m_brkName[nPosColon - 2] == ':') + nPosColon -= 2; + // Extract file name and line number/function from it fileName = m_brkName.substr(0, nPosColon); rStrLineOrFn = m_brkName.substr(nPosColon + 1, m_brkName.size() - nPosColon - 1);