forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BaseAdress_gcc_x64.cmake and use it in the CMakeLists
- Loading branch information
Showing
4 changed files
with
615 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
diff --git a/dll/win32/advapi32/service/eventlog.c b/dll/win32/advapi32/service/eventlog.c | ||
index 028e5d234ce..3ba4bee8e97 100644 | ||
--- a/dll/win32/advapi32/service/eventlog.c | ||
+++ b/dll/win32/advapi32/service/eventlog.c | ||
@@ -94,6 +94,9 @@ EVENTLOG_HANDLE_A_unbind(EVENTLOG_HANDLE_A UNCServerName, | ||
handle_t __RPC_USER | ||
EVENTLOG_HANDLE_W_bind(EVENTLOG_HANDLE_W UNCServerName) | ||
{ | ||
+ #ifdef _M_AMD64 | ||
+ return NULL; | ||
+ #endif | ||
handle_t hBinding = NULL; | ||
RPC_WSTR pszStringBinding; | ||
RPC_STATUS status; | ||
diff --git a/dll/win32/kernel32/client/debugger.c b/dll/win32/kernel32/client/debugger.c | ||
index a466296f451..9d5529f4dc8 100644 | ||
--- a/dll/win32/kernel32/client/debugger.c | ||
+++ b/dll/win32/kernel32/client/debugger.c | ||
@@ -692,6 +692,7 @@ VOID | ||
WINAPI | ||
OutputDebugStringA(IN LPCSTR _OutputString) | ||
{ | ||
+ #ifndef _M_AMD64 | ||
_SEH2_TRY | ||
{ | ||
ULONG_PTR a_nArgs[2]; | ||
@@ -703,6 +704,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
RaiseException(DBG_PRINTEXCEPTION_C, 0, 2, a_nArgs); | ||
} | ||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) | ||
+ #endif | ||
{ | ||
/* no user-mode debugger: try the systemwide debug message monitor, or the | ||
kernel debugger as a last resort */ | ||
@@ -740,6 +742,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
|
||
_SEH2_TRY | ||
{ | ||
+ DPRINT1("SIMONE 1\n"); | ||
volatile PCHAR a_cBuffer = NULL; | ||
|
||
/* opening the mutex failed */ | ||
@@ -790,6 +793,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
|
||
_SEH2_TRY | ||
{ | ||
+ DPRINT1("SIMONE 1\n"); | ||
/* size of the current output block */ | ||
volatile SIZE_T nRoundLen; | ||
|
||
@@ -885,6 +889,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
} | ||
_SEH2_FINALLY | ||
{ | ||
+ DPRINT1("SIMONE 2\n"); | ||
/* close all the still open resources */ | ||
if (hDBMonBufferReady) CloseHandle(hDBMonBufferReady); | ||
if (pDBMonBuffer) UnmapViewOfFile(pDBMonBuffer); | ||
@@ -897,7 +902,9 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
} | ||
_SEH2_END; | ||
} | ||
+ #ifndef _M_AMD64 | ||
_SEH2_END; | ||
+ #endif | ||
} | ||
|
||
/* | ||
diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h | ||
index c7bf663d1c8..95d5256f2c8 100644 | ||
--- a/ntoskrnl/include/internal/mm.h | ||
+++ b/ntoskrnl/include/internal/mm.h | ||
@@ -868,7 +868,8 @@ MmDeleteKernelStack(PVOID Stack, | ||
|
||
/* balance.c / pagefile.c******************************************************/ | ||
|
||
-inline VOID UpdateTotalCommittedPages(LONG Delta) | ||
+FORCEINLINE | ||
+VOID UpdateTotalCommittedPages(LONG Delta) | ||
{ | ||
/* | ||
* Add up all the used "Committed" memory + pagefile. | ||
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake | ||
index 1bef231351f..10ca85a37ec 100644 | ||
--- a/ntoskrnl/ntos.cmake | ||
+++ b/ntoskrnl/ntos.cmake | ||
@@ -1,3 +1,4 @@ | ||
+add_compile_options(-O0) | ||
|
||
include_directories( | ||
${REACTOS_SOURCE_DIR} | ||
diff --git a/sdk/cmake/baseaddress.cmake b/sdk/cmake/baseaddress.cmake | ||
index 02ad613b9b9..fa58958bbb2 100644 | ||
--- a/sdk/cmake/baseaddress.cmake | ||
+++ b/sdk/cmake/baseaddress.cmake | ||
@@ -1,8 +1,8 @@ | ||
# Generated from output-MinGW-i386/ | ||
# Generated by sdk/tools/gen_baseaddress.py | ||
|
||
-set(baseaddress_ntdll 0x7c920000) # should be above 0x7c920000 | ||
-set(baseaddress_kernel32 0x7c620000) | ||
+set(baseaddress_ntdll 0x7c800000) # should be above 0x7c920000 | ||
+set(baseaddress_kernel32 0x77e40000) | ||
set(baseaddress_msvcrt 0x7c530000) | ||
set(baseaddress_advapi32 0x7c470000) | ||
set(baseaddress_gdi32 0x7c210000) | ||
diff --git a/sdk/lib/rtl/amd64/unwind.c b/sdk/lib/rtl/amd64/unwind.c | ||
index dec55f7d3a5..a3413b3c56d 100644 | ||
--- a/sdk/lib/rtl/amd64/unwind.c | ||
+++ b/sdk/lib/rtl/amd64/unwind.c | ||
@@ -847,6 +847,9 @@ RtlpUnwindInternal( | ||
|
||
/* We have successfully unwound a frame. Copy the unwind context back. */ | ||
*ContextRecord = UnwindContext; | ||
+ #ifdef _M_AMD64 | ||
+ return TRUE; | ||
+ #endif | ||
} | ||
|
||
if (ExceptionRecord->ExceptionCode != STATUS_UNWIND_CONSOLIDATE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
diff --git a/dll/win32/advapi32/service/eventlog.c b/dll/win32/advapi32/service/eventlog.c | ||
index 028e5d234ce..3ba4bee8e97 100644 | ||
--- a/dll/win32/advapi32/service/eventlog.c | ||
+++ b/dll/win32/advapi32/service/eventlog.c | ||
@@ -94,6 +94,9 @@ EVENTLOG_HANDLE_A_unbind(EVENTLOG_HANDLE_A UNCServerName, | ||
handle_t __RPC_USER | ||
EVENTLOG_HANDLE_W_bind(EVENTLOG_HANDLE_W UNCServerName) | ||
{ | ||
+ #ifdef _M_AMD64 | ||
+ return NULL; | ||
+ #endif | ||
handle_t hBinding = NULL; | ||
RPC_WSTR pszStringBinding; | ||
RPC_STATUS status; | ||
diff --git a/dll/win32/kernel32/client/debugger.c b/dll/win32/kernel32/client/debugger.c | ||
index a466296f451..9d5529f4dc8 100644 | ||
--- a/dll/win32/kernel32/client/debugger.c | ||
+++ b/dll/win32/kernel32/client/debugger.c | ||
@@ -692,6 +692,7 @@ VOID | ||
WINAPI | ||
OutputDebugStringA(IN LPCSTR _OutputString) | ||
{ | ||
+ #ifndef _M_AMD64 | ||
_SEH2_TRY | ||
{ | ||
ULONG_PTR a_nArgs[2]; | ||
@@ -703,6 +704,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
RaiseException(DBG_PRINTEXCEPTION_C, 0, 2, a_nArgs); | ||
} | ||
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) | ||
+ #endif | ||
{ | ||
/* no user-mode debugger: try the systemwide debug message monitor, or the | ||
kernel debugger as a last resort */ | ||
@@ -740,6 +742,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
|
||
_SEH2_TRY | ||
{ | ||
+ DPRINT1("SIMONE 1\n"); | ||
volatile PCHAR a_cBuffer = NULL; | ||
|
||
/* opening the mutex failed */ | ||
@@ -790,6 +793,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
|
||
_SEH2_TRY | ||
{ | ||
+ DPRINT1("SIMONE 1\n"); | ||
/* size of the current output block */ | ||
volatile SIZE_T nRoundLen; | ||
|
||
@@ -885,6 +889,7 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
} | ||
_SEH2_FINALLY | ||
{ | ||
+ DPRINT1("SIMONE 2\n"); | ||
/* close all the still open resources */ | ||
if (hDBMonBufferReady) CloseHandle(hDBMonBufferReady); | ||
if (pDBMonBuffer) UnmapViewOfFile(pDBMonBuffer); | ||
@@ -897,7 +902,9 @@ OutputDebugStringA(IN LPCSTR _OutputString) | ||
} | ||
_SEH2_END; | ||
} | ||
+ #ifndef _M_AMD64 | ||
_SEH2_END; | ||
+ #endif | ||
} | ||
|
||
/* | ||
diff --git a/ntoskrnl/ntos.cmake b/ntoskrnl/ntos.cmake | ||
index 1bef231351f..10ca85a37ec 100644 | ||
--- a/ntoskrnl/ntos.cmake | ||
+++ b/ntoskrnl/ntos.cmake | ||
@@ -1,3 +1,4 @@ | ||
+add_compile_options(-O0) | ||
|
||
include_directories( | ||
${REACTOS_SOURCE_DIR} | ||
diff --git a/sdk/cmake/baseaddress.cmake b/sdk/cmake/baseaddress.cmake | ||
index 02ad613b9b9..fa58958bbb2 100644 | ||
--- a/sdk/cmake/baseaddress.cmake | ||
+++ b/sdk/cmake/baseaddress.cmake | ||
@@ -1,8 +1,8 @@ | ||
# Generated from output-MinGW-i386/ | ||
# Generated by sdk/tools/gen_baseaddress.py | ||
|
||
-set(baseaddress_ntdll 0x7c920000) # should be above 0x7c920000 | ||
-set(baseaddress_kernel32 0x7c620000) | ||
+set(baseaddress_ntdll 0x7c800000) # should be above 0x7c920000 | ||
+set(baseaddress_kernel32 0x77e40000) | ||
set(baseaddress_msvcrt 0x7c530000) | ||
set(baseaddress_advapi32 0x7c470000) | ||
set(baseaddress_gdi32 0x7c210000) | ||
diff --git a/sdk/lib/rtl/amd64/unwind.c b/sdk/lib/rtl/amd64/unwind.c | ||
index dec55f7d3a5..a3413b3c56d 100644 | ||
--- a/sdk/lib/rtl/amd64/unwind.c | ||
+++ b/sdk/lib/rtl/amd64/unwind.c | ||
@@ -847,6 +847,9 @@ RtlpUnwindInternal( | ||
|
||
/* We have successfully unwound a frame. Copy the unwind context back. */ | ||
*ContextRecord = UnwindContext; | ||
+ #ifdef _M_AMD64 | ||
+ return TRUE; | ||
+ #endif | ||
} | ||
|
||
if (ExceptionRecord->ExceptionCode != STATUS_UNWIND_CONSOLIDATE) |
Oops, something went wrong.