[Lldb-commits] [PATCH] D60405: MinidumpYAML: Add support for ModuleList stream

James Henderson via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 18 03:50:19 PDT 2019


jhenderson accepted this revision.
jhenderson added inline comments.


================
Comment at: lib/ObjectYAML/MinidumpYAML.cpp:21
+/// methods, while the final minidump file is written by calling the writeTo
+/// method. The plan versions of allocation functions take a reference to the
+/// data which is to be written (and hence the data must be available until
----------------
plan -> plain (?)


================
Comment at: lib/ObjectYAML/MinidumpYAML.cpp:97
 
-  SmallVector<support::ulittle16_t, 32> EndianStr(WStr.size() + 1,
-                                                  support::ulittle16_t());
-  copy(WStr, EndianStr.begin());
-  return allocateCallback(
-      sizeof(uint32_t) + EndianStr.size() * sizeof(support::ulittle16_t),
-      [EndianStr](raw_ostream &OS) {
-        // Length does not include the null-terminator.
-        support::ulittle32_t Length(2 * (EndianStr.size() - 1));
-        OS.write(reinterpret_cast<const char *>(&Length), sizeof(Length));
-        OS.write(reinterpret_cast<const char *>(EndianStr.begin()),
-                 sizeof(support::ulittle16_t) * EndianStr.size());
-      });
+  // The the utf16 string is null-terminated, but the terminator is not counted
+  // in the string size.
----------------
Double "the"


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60405/new/

https://reviews.llvm.org/D60405





More information about the lldb-commits mailing list