[Lldb-commits] [PATCH] D61885: Minidump: Add support for the MemoryList stream

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 15 02:50:57 PDT 2019


labath added inline comments.


================
Comment at: include/llvm/Object/Minidump.h:85-86
+  /// error is returned if the file does not contain this stream, or if the
+  /// stream is not large enough to contain the number of threads declared in
+  /// the stream header. The consistency of the Thread entries themselves is not
+  /// checked in any way.
----------------
jhenderson wrote:
> These two lines talk about threads. Is that a copy/paste error?
Yep, sorry. This is the downside of "straight-forward applications of established
patterns" :/


================
Comment at: include/llvm/ObjectYAML/MinidumpYAML.h:92
+/// A structure containing all data describing a single memory region.
+struct ParsedMemoryRange {
+  static constexpr Stream::StreamKind Kind = Stream::StreamKind::MemoryList;
----------------
jhenderson wrote:
> Would it make more sense to call this ParsedMermoryList, to match the StreamType?
Not really, because this represents only one entry in the MemoryList stream, and not list as a whole. However, we could call it ParsedMemoryDescriptor, as that's the type of the list entries.


================
Comment at: test/tools/obj2yaml/basic-minidump.yaml:54-57
+  - Type:            MemoryList
+    Memory Ranges:   
+      - Start of Memory Range: 0x7C7D7E7F80818283
+        Content:         '8485868788'
----------------
jhenderson wrote:
> I'd probably find this neater if the Indentation of values for each entry were more consistent, but I'm not too fussed.
> 
> Also, in the ThreadList above, the Content is not quoted, but here it is. Please standardise it on one or the other.
Done. The different quoting of is actually a relict of how obj2yaml prints BinaryRef values (they omit quotes if the data happens to be contain hex (A-F) characters). Do you think it would be worth making this output more consistent too?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61885





More information about the lldb-commits mailing list