Commit e952585d authored by Aleksey R.'s avatar Aleksey R.

add: minimal ARM64 support (5606c91a) tests

parent d1401f41
#include <stdafx.h>
#include "memdumpfixture.h"
#include "kdlib/typeinfo.h"
#include "kdlib/memaccess.h"
#include "kdlib/module.h"
#include <Windows.h>
using namespace kdlib;
class ARM64KernelMiniDump : public MemDumpFixture
{
public:
ARM64KernelMiniDump()
: MemDumpFixture( MemDumpFixture::getARM64KernelDumpName())
{
}
};
TEST_F(ARM64KernelMiniDump, Test)
{
// dbgmem
EXPECT_EQ( 0, addr64(0) );
EXPECT_EQ( 0x80000000, addr64(0x80000000) );
// dbgeng
EXPECT_EQ( CPU_ARM64, getCPUType() );
EXPECT_EQ( CPU_ARM64, getCPUMode() );
EXPECT_EQ( true, is64bitSystem() );
EXPECT_EQ( evaluate(L"@$retreg").asULongLong(), getReturnReg() );
// typeinfo
{
const auto typeInfo{ loadType(L"nt!_IRP*") };
ASSERT_TRUE( typeInfo.get() );
EXPECT_EQ( 8, typeInfo->getSize() );
EXPECT_EQ( 8, typeInfo->getPtrSize() );
}
// MS DIA
{
const std::wstring symName{ L"nt!KiUpdateThreadState" };
EXPECT_EQ(evaluate(symName).asULongLong(), getSymbolOffset(symName));
}
// symexport
{
const auto clipsp{ loadModule(L"clipsp") };
ASSERT_TRUE( clipsp.get() );
EXPECT_TRUE( clipsp->getSymFile() == L"export symbols" );
EXPECT_EQ( evaluate(L"clipsp!ClipSpInitialize").asULongLong(), clipsp->getSymbolVa(L"ClipSpInitialize") );
}
}
......@@ -96,7 +96,7 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
......@@ -117,7 +117,7 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
......@@ -190,6 +190,7 @@
<ItemGroup>
<ClCompile Include="..\comdate\testfunc.cpp" />
<ClCompile Include="..\comdate\testvars.cpp" />
<ClCompile Include="arm64dumptest.cpp" />
<ClCompile Include="breakhandler.cpp" />
<ClCompile Include="clangtest.cpp" />
<ClCompile Include="cputest.cpp" />
......
......@@ -65,6 +65,9 @@
<ClCompile Include="winapitest.cpp">
<Filter>testcases</Filter>
</ClCompile>
<ClCompile Include="arm64dumptest.cpp">
<Filter>testcases</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
......
......@@ -26,6 +26,7 @@ public:
try {
if (m_dumpId != -1)
kdlib::closeDump(m_dumpId);
m_dumpId = -1;
}
catch(kdlib::DbgException&)
{}
......@@ -36,6 +37,11 @@ public:
return L"..\\..\\..\\kdlib\\tests\\dumps\\win8_x64_mem.cab";
}
static std::wstring getARM64KernelDumpName()
{
return L"..\\..\\..\\kdlib\\tests\\dumps\\win10_arm64_mem.cab";
}
private:
std::wstring m_dumpName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment