[Lldb-commits] [lldb] r242306 - Fix -data-info-line when source includes column number.

Hans Wennborg hans at chromium.org
Wed Jul 15 13:39:39 PDT 2015


On Wed, Jul 15, 2015 at 11:06 AM, Ilia K <ki.stfu at gmail.com> wrote:
> Hi Hans,
>
> This patch fixes -data-info-line command for some cases. Could you merge it
> into 3.7 release branch?

Merged in r242328.

Cheers,
Hans

> On Jul 15, 2015 8:28 PM, "Dawn Perchik" <dawn at burble.org> wrote:
>>
>> 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);
>>
>>
>> _______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list