[llvm-branch-commits] [lldb] r242328 - Merging r242306:

Hans Wennborg hans at hanshq.net
Wed Jul 15 13:39:00 PDT 2015


Author: hans
Date: Wed Jul 15 15:39:00 2015
New Revision: 242328

URL: http://llvm.org/viewvc/llvm-project?rev=242328&view=rev
Log:
Merging r242306:
------------------------------------------------------------------------
r242306 | dperchik | 2015-07-15 10:25:01 -0700 (Wed, 15 Jul 2015) | 10 lines

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/branches/release_37/   (props changed)
    lldb/branches/release_37/tools/lldb-mi/MICmdCmdData.cpp

Propchange: lldb/branches/release_37/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 15 15:39:00 2015
@@ -1,2 +1,3 @@
 /lldb/branches/apple/python-GIL:156467-162159
 /lldb/branches/iohandler:198360-200250
+/lldb/trunk:242306

Modified: lldb/branches/release_37/tools/lldb-mi/MICmdCmdData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_37/tools/lldb-mi/MICmdCmdData.cpp?rev=242328&r1=242327&r2=242328&view=diff
==============================================================================
--- lldb/branches/release_37/tools/lldb-mi/MICmdCmdData.cpp (original)
+++ lldb/branches/release_37/tools/lldb-mi/MICmdCmdData.cpp Wed Jul 15 15:39:00 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 llvm-branch-commits mailing list