[Lldb-commits] [lldb] r374776 - minidump: Use yaml for memory info tests
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 14 07:16:39 PDT 2019
Author: labath
Date: Mon Oct 14 07:16:39 2019
New Revision: 374776
URL: http://llvm.org/viewvc/llvm-project?rev=374776&view=rev
Log:
minidump: Use yaml for memory info tests
Also, delete some minidump binary files that are no longer used in any
test.
Removed:
lldb/trunk/unittests/Process/minidump/Inputs/dump-content.dmp
lldb/trunk/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp
Modified:
lldb/trunk/unittests/Process/minidump/CMakeLists.txt
lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp
Modified: lldb/trunk/unittests/Process/minidump/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/CMakeLists.txt?rev=374776&r1=374775&r2=374776&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/minidump/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Process/minidump/CMakeLists.txt Mon Oct 14 07:16:39 2019
@@ -19,7 +19,6 @@ set(test_inputs
fizzbuzz_no_heap.dmp
fizzbuzz_wow64.dmp
linux-x86_64.dmp
- linux-x86_64_not_crashed.dmp
regions-memlist64.dmp
)
Removed: lldb/trunk/unittests/Process/minidump/Inputs/dump-content.dmp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/Inputs/dump-content.dmp?rev=374775&view=auto
==============================================================================
Binary file - no diff available.
Removed: lldb/trunk/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp?rev=374775&view=auto
==============================================================================
Binary file - no diff available.
Modified: lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp?rev=374776&r1=374775&r2=374776&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp (original)
+++ lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp Mon Oct 14 07:16:39 2019
@@ -365,7 +365,53 @@ constexpr auto no = MemoryRegionInfo::eN
constexpr auto unknown = MemoryRegionInfo::eDontKnow;
TEST_F(MinidumpParserTest, GetMemoryRegionInfo) {
- SetUpData("fizzbuzz_wow64.dmp");
+ ASSERT_THAT_ERROR(SetUpFromYaml(R"(
+--- !minidump
+Streams:
+ - Type: MemoryInfoList
+ Memory Ranges:
+ - Base Address: 0x0000000000000000
+ Allocation Protect: [ ]
+ Region Size: 0x0000000000010000
+ State: [ MEM_FREE ]
+ Protect: [ PAGE_NO_ACCESS ]
+ Type: [ ]
+ - Base Address: 0x0000000000010000
+ Allocation Protect: [ PAGE_READ_WRITE ]
+ Region Size: 0x0000000000010000
+ State: [ MEM_COMMIT ]
+ Type: [ MEM_MAPPED ]
+ - Base Address: 0x0000000000020000
+ Allocation Protect: [ PAGE_READ_WRITE ]
+ Region Size: 0x0000000000010000
+ State: [ MEM_COMMIT ]
+ Type: [ MEM_MAPPED ]
+ - Base Address: 0x0000000000030000
+ Allocation Protect: [ PAGE_READ_WRITE ]
+ Region Size: 0x0000000000001000
+ State: [ MEM_COMMIT ]
+ Type: [ MEM_MAPPED ]
+ - Base Address: 0x0000000000040000
+ Allocation Protect: [ PAGE_EXECUTE_WRITE_COPY ]
+ Region Size: 0x0000000000001000
+ State: [ MEM_COMMIT ]
+ Protect: [ PAGE_READ_ONLY ]
+ Type: [ MEM_IMAGE ]
+ - Base Address: 0x000000007FFE0000
+ Allocation Protect: [ PAGE_READ_ONLY ]
+ Region Size: 0x0000000000001000
+ State: [ MEM_COMMIT ]
+ Type: [ MEM_PRIVATE ]
+ - Base Address: 0x000000007FFE1000
+ Allocation Base: 0x000000007FFE0000
+ Allocation Protect: [ PAGE_READ_ONLY ]
+ Region Size: 0x000000000000F000
+ State: [ MEM_RESERVE ]
+ Protect: [ PAGE_NO_ACCESS ]
+ Type: [ MEM_PRIVATE ]
+...
+)"),
+ llvm::Succeeded());
check_region(*parser, 0x00000000, 0x00010000, no, no, no, no);
check_region(*parser, 0x00010000, 0x00020000, yes, yes, no, yes);
More information about the lldb-commits
mailing list