Fix build failure caused by dynamic unwind patches on 32-bit.

This commit is contained in:
Sebastian Lackner
2014-04-05 03:47:22 +02:00
parent 68c91b3113
commit 0df720506a
4 changed files with 15 additions and 11 deletions

View File

@@ -1,28 +1,30 @@
From fe1571d281c60aa9a1db503c8d143ac5029982c2 Mon Sep 17 00:00:00 2001
From f9bc66f164f6d556e383585d761ed7bf9b5187e1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 5 Apr 2014 01:04:25 +0200
Subject: ntdll/tests: Add tests for dynamic unwind table.
---
dlls/ntdll/tests/exception.c | 133 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)
dlls/ntdll/tests/exception.c | 137 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 137 insertions(+)
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index b4cbaf5..ac70802 100644
index b4cbaf5..9658aa5 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -49,6 +49,10 @@ static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE
@@ -49,6 +49,12 @@ static NTSTATUS (WINAPI *pNtReadVirtualMemory)(HANDLE, const void*, void*, SIZE
static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);
+#if defined(__x86_64__)
+static BOOLEAN (WINAPI *pRtlAddFunctionTable)(RUNTIME_FUNCTION*, DWORD, DWORD64);
+static BOOLEAN (WINAPI *pRtlDeleteFunctionTable)(RUNTIME_FUNCTION*);
+static BOOLEAN (WINAPI *pRtlInstallFunctionTableCallback)(DWORD64, DWORD64, DWORD, PGET_RUNTIME_FUNCTION_CALLBACK, PVOID, PCWSTR);
+static PRUNTIME_FUNCTION (WINAPI *pRtlLookupFunctionEntry)(ULONG64, ULONG64*, UNWIND_HISTORY_TABLE*);
+#endif
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
#ifdef __i386__
@@ -1447,6 +1451,122 @@ static void test_virtual_unwind(void)
@@ -1447,6 +1453,122 @@ static void test_virtual_unwind(void)
call_virtual_unwind( i, &tests[i] );
}
@@ -145,10 +147,11 @@ index b4cbaf5..ac70802 100644
#endif /* __x86_64__ */
START_TEST(exception)
@@ -1473,6 +1593,14 @@ START_TEST(exception)
@@ -1473,6 +1595,16 @@ START_TEST(exception)
"NtQueryInformationProcess" );
pNtSetInformationProcess = (void*)GetProcAddress( hntdll,
"NtSetInformationProcess" );
+#if defined(__x86_64__)
+ pRtlAddFunctionTable = (void *)GetProcAddress( hntdll,
+ "RtlAddFunctionTable" );
+ pRtlDeleteFunctionTable = (void *)GetProcAddress( hntdll,
@@ -157,10 +160,11 @@ index b4cbaf5..ac70802 100644
+ "RtlInstallFunctionTableCallback" );
+ pRtlLookupFunctionEntry = (void *)GetProcAddress( hntdll,
+ "RtlLookupFunctionEntry" );
+#endif
pIsWow64Process = (void *)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsWow64Process");
#ifdef __i386__
@@ -1537,6 +1665,11 @@ START_TEST(exception)
@@ -1537,6 +1669,11 @@ START_TEST(exception)
test_virtual_unwind();

View File

@@ -1,4 +1,4 @@
From cc5139cddb7ca4df84b2e1f9b67b39c4c413b3ce Mon Sep 17 00:00:00 2001
From 71d9e2ae7a81a8ab030933a10984cad5c5a8c7c1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 5 Apr 2014 02:01:38 +0200
Subject: kernel32: Forward RtlInstallFunctionTableCallback to ntdll

View File

@@ -1,3 +1,3 @@
Revision: 3
Revision: 4
Author: Sebastian Lackner
Title: Add implementation for dynamic unwind tables/callbacks on x86_64.