[Lldb-commits] [PATCH] D11209: Fix -data-info-line when source includes column number.

Dawn Perchik dawn+llvm at burble.org
Tue Jul 14 18:07:13 PDT 2015


dawn created this revision.
dawn added reviewers: abidh, brucem, ki.stfu.
dawn added a subscriber: lldb-commits.
dawn set the repository for this revision to rL LLVM.

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.

Repository:
  rL LLVM

http://reviews.llvm.org/D11209

Files:
  tools/lldb-mi/MICmdCmdData.cpp

Index: tools/lldb-mi/MICmdCmdData.cpp
===================================================================
--- tools/lldb-mi/MICmdCmdData.cpp
+++ tools/lldb-mi/MICmdCmdData.cpp
@@ -1789,7 +1789,7 @@
             //                                                                     ^ -- 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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11209.29740.patch
Type: text/x-patch
Size: 869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150715/2c2b574e/attachment.bin>


More information about the lldb-commits mailing list