labath added a subscriber: lemo.
labath added a comment.

@markmentovai, @lemo, do you know under which circumstances do these extra 4 
bytes get emitted? Is there any chance we could document this better than just 
saying "sometimes"?



================
Comment at: unittests/Process/minidump/MinidumpParserTest.cpp:90
+  // after the thread count.
+  SetUpData("thread-list-padded.dmp");
+  llvm::ArrayRef<MinidumpThread> thread_list;
----------------
You'll also need to add these files to 
`unittests/Process/minidump/CMakeLists.txt`. Otherwise the tests won't work 
from cmake.


================
Comment at: unittests/Process/minidump/MinidumpParserTest.cpp:151-152
+  auto mem = parser->FindMemoryRange(0x8000);
+  EXPECT_TRUE(mem.hasValue());
+  if (mem.hasValue())
+    EXPECT_EQ((lldb::addr_t)0x8000, mem->start);
----------------
You can avoid the if statement by changing the previous check to `ASSERT_TRUE`. 
ASSERT_*** macros automatically terminate the test if they fail so you won't 
get a crash there.


https://reviews.llvm.org/D49579



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to