[Lldb-commits] [PATCH] D68645: MinidumpYAML: Add support for the memory info list stream

George Rimar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 9 07:49:01 PDT 2019


grimar added inline comments.


================
Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:111
+
+  explicit MemoryInfoListStream(std::vector<minidump::MemoryInfo> Infos)
+      : Stream(StreamKind::MemoryInfoList,
----------------
Maybe be more explicit here, i.e.

```
std::vector<minidump::MemoryInfo> &&Infos
```
?


================
Comment at: lib/ObjectYAML/MinidumpEmitter.cpp:166
+    Header.SizeOfEntry = sizeof(minidump::MemoryInfo);
+    Header.NumberOfEntries = InfoList.Infos.size();
+    File.allocateNewObject<minidump::MemoryInfoListHeader>(Header);
----------------
Probably just

```
    minidump::MemoryInfoListHeader Header = {
        (support::ulittle32_t)sizeof(minidump::MemoryInfoListHeader),
        (support::ulittle32_t)sizeof(minidump::MemoryInfo),
        (support::ulittle64_t)InfoList.Infos.size()};
```

?

Or perhaps it could have a constructor.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D68645





More information about the lldb-commits mailing list