[Lldb-commits] [PATCH] D49579: Support parsing minidump files that are created by Breakpad.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 20 05:46:58 PDT 2018


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





More information about the lldb-commits mailing list