[Lldb-commits] [lldb] r242306 - Fix -data-info-line when source includes column number.
Dawn Perchik
dawn at burble.org
Wed Jul 15 10:25:01 PDT 2015
Author: dperchik
Date: Wed Jul 15 12:25:01 2015
New Revision: 242306
URL: http://llvm.org/viewvc/llvm-project?rev=242306&view=rev
Log:
Fix -data-info-line when source includes column number.
This fixes an off-by-one bug in CMICmdCmdDataInfoLine::Acknowledge. Given:
LineEntry: \[0x0000000100000f37-0x0000000100000f45\): /path/to/file:123:1
-data-info-line would report the line as 12, omitting the last digit.
Reviewed by: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11209
Modified:
lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp
Modified: lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp?rev=242306&r1=242305&r2=242306&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdCmdData.cpp Wed Jul 15 12:25:01 2015
@@ -1789,7 +1789,7 @@ CMICmdCmdDataInfoLine::Acknowledge(void)
// ^ -- line
const size_t nLineStartPos = nFileEndPos + 1;
const size_t nLineEndPos = rLine.find(':', nLineStartPos);
- const size_t nLineLen = nLineEndPos != std::string::npos ? nLineEndPos - nLineStartPos - 1
+ const size_t nLineLen = nLineEndPos != std::string::npos ? nLineEndPos - nLineStartPos
: std::string::npos;
const CMIUtilString strLine(rLine.substr(nLineStartPos, nLineLen).c_str());
const CMICmnMIValueConst miValueConst4(strLine);
More information about the lldb-commits
mailing list