[Lldb-commits] [lldb] r138950 - in /lldb/trunk: include/lldb/lldb-forward.h source/Core/DataEncoder.cpp

Greg Clayton gclayton at apple.com
Thu Sep 1 11:13:54 PDT 2011


Author: gclayton
Date: Thu Sep  1 13:13:54 2011
New Revision: 138950

URL: http://llvm.org/viewvc/llvm-project?rev=138950&view=rev
Log:
Forgot to write out the NULL terminator when putting C string value into
a data using DataEncoder.

Added DataEncoder to the lldb-forward.h file.


Modified:
    lldb/trunk/include/lldb/lldb-forward.h
    lldb/trunk/source/Core/DataEncoder.cpp

Modified: lldb/trunk/include/lldb/lldb-forward.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-forward.h?rev=138950&r1=138949&r2=138950&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-forward.h (original)
+++ lldb/trunk/include/lldb/lldb-forward.h Thu Sep  1 13:13:54 2011
@@ -62,6 +62,7 @@
 class   DWARFCallFrameInfo;
 class   DWARFExpression;
 class   DataBuffer;
+class   DataEncoder;
 class   DataExtractor;
 class   Debugger;
 class   Declaration;

Modified: lldb/trunk/source/Core/DataEncoder.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/DataEncoder.cpp?rev=138950&r1=138949&r2=138950&view=diff
==============================================================================
--- lldb/trunk/source/Core/DataEncoder.cpp (original)
+++ lldb/trunk/source/Core/DataEncoder.cpp Thu Sep  1 13:13:54 2011
@@ -356,6 +356,6 @@
 DataEncoder::PutCString (uint32_t offset, const char *cstr)
 {
     if (cstr)
-        return PutData (offset, cstr, strlen(cstr));
+        return PutData (offset, cstr, strlen(cstr) + 1);
     return UINT32_MAX;
 }





More information about the lldb-commits mailing list