mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 07:26:20 +00:00
[REACTOS] Fix 64 bit build (#465)
* [HAL] Simplify HalpReboot() and make it portable * [NTOS:MM] Cast constant to PVOID * [BINPATCH] Fix 64 bit build * [VFDDRV] Fix 64 bit build and buffer overruns * [USBOHCI] Fix structure alignment issues * [ATL_APITEST] Fix 64 bit build * [XDK] Update unwind structures in winnt.h * [NTDLL_APITEST] Fix 64 bit build * [NTDLL_WINETEST] Fix 64 bit build * [TFTPD] Fix x64 build * [USBPORT] Fix a C_ASSERT * [DSOUND] Fix x64 build * [HAL] Remove obsolete GetPteAddress() macro
This commit is contained in:
parent
d5f744ff31
commit
6b1ca75899
24 changed files with 243 additions and 85 deletions
|
@ -1420,6 +1420,12 @@ typedef struct _KNONVOLATILE_CONTEXT_POINTERS {
|
|||
} DUMMYUNIONNAME2;
|
||||
} KNONVOLATILE_CONTEXT_POINTERS, *PKNONVOLATILE_CONTEXT_POINTERS;
|
||||
|
||||
#define UNW_FLAG_NHANDLER 0x0
|
||||
#define UNW_FLAG_EHANDLER 0x1
|
||||
#define UNW_FLAG_UHANDLER 0x2
|
||||
#define UNW_FLAG_CHAININFO 0x4
|
||||
#define UNW_FLAG_NO_EPILOGUE 0x80000000UL
|
||||
|
||||
#define RUNTIME_FUNCTION_INDIRECT 0x1
|
||||
|
||||
typedef struct _RUNTIME_FUNCTION {
|
||||
|
@ -1439,7 +1445,10 @@ typedef struct _UNWIND_HISTORY_TABLE_ENTRY
|
|||
typedef struct _UNWIND_HISTORY_TABLE
|
||||
{
|
||||
DWORD Count;
|
||||
UCHAR Search;
|
||||
BYTE LocalHint;
|
||||
BYTE GlobalHint;
|
||||
BYTE Search;
|
||||
BYTE Once;
|
||||
ULONG64 LowAddress;
|
||||
ULONG64 HighAddress;
|
||||
UNWIND_HISTORY_TABLE_ENTRY Entry[UNWIND_HISTORY_TABLE_SIZE];
|
||||
|
@ -1448,19 +1457,61 @@ typedef struct _UNWIND_HISTORY_TABLE
|
|||
typedef
|
||||
_Function_class_(GET_RUNTIME_FUNCTION_CALLBACK)
|
||||
PRUNTIME_FUNCTION
|
||||
(*PGET_RUNTIME_FUNCTION_CALLBACK)(
|
||||
_In_ DWORD64 ControlPc,
|
||||
_In_opt_ PVOID Context);
|
||||
GET_RUNTIME_FUNCTION_CALLBACK(
|
||||
_In_ DWORD64 ControlPc,
|
||||
_In_opt_ PVOID Context);
|
||||
typedef GET_RUNTIME_FUNCTION_CALLBACK *PGET_RUNTIME_FUNCTION_CALLBACK;
|
||||
|
||||
typedef
|
||||
_Function_class_(OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)
|
||||
_Must_inspect_result_
|
||||
DWORD
|
||||
(*POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK)(
|
||||
_In_ HANDLE Process,
|
||||
_In_ PVOID TableAddress,
|
||||
_Out_ PDWORD Entries,
|
||||
_Out_ PRUNTIME_FUNCTION *Functions);
|
||||
OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK(
|
||||
_In_ HANDLE Process,
|
||||
_In_ PVOID TableAddress,
|
||||
_Out_ PDWORD Entries,
|
||||
_Out_ PRUNTIME_FUNCTION* Functions);
|
||||
typedef OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK *POUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK;
|
||||
|
||||
struct _EXCEPTION_POINTERS;
|
||||
typedef
|
||||
LONG
|
||||
(*PEXCEPTION_FILTER) (
|
||||
struct _EXCEPTION_POINTERS *ExceptionPointers,
|
||||
PVOID EstablisherFrame);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*PTERMINATION_HANDLER) (
|
||||
BOOLEAN AbnormalTermination,
|
||||
PVOID EstablisherFrame);
|
||||
|
||||
typedef struct _DISPATCHER_CONTEXT
|
||||
{
|
||||
ULONG64 ControlPc;
|
||||
PVOID ImageBase;
|
||||
PVOID FunctionEntry;
|
||||
PVOID EstablisherFrame;
|
||||
ULONG64 TargetIp;
|
||||
PVOID ContextRecord;
|
||||
PEXCEPTION_ROUTINE LanguageHandler;
|
||||
PVOID HandlerData;
|
||||
PUNWIND_HISTORY_TABLE HistoryTable;
|
||||
ULONG ScopeIndex;
|
||||
ULONG Fill0;
|
||||
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
|
||||
|
||||
typedef struct _SCOPE_TABLE_AMD64
|
||||
{
|
||||
DWORD Count;
|
||||
struct
|
||||
{
|
||||
DWORD BeginAddress;
|
||||
DWORD EndAddress;
|
||||
DWORD HandlerAddress;
|
||||
DWORD JumpTarget;
|
||||
} ScopeRecord[1];
|
||||
} SCOPE_TABLE_AMD64, *PSCOPE_TABLE_AMD64;
|
||||
typedef SCOPE_TABLE_AMD64 SCOPE_TABLE, *PSCOPE_TABLE;
|
||||
|
||||
#define OUT_OF_PROCESS_FUNCTION_TABLE_CALLBACK_EXPORT_NAME "OutOfProcessFunctionTableCallback"
|
||||
|
||||
|
@ -1513,6 +1564,17 @@ RtlVirtualUnwind(
|
|||
_Out_ PDWORD64 EstablisherFrame,
|
||||
_Inout_opt_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers);
|
||||
|
||||
NTSYSAPI
|
||||
VOID
|
||||
NTAPI
|
||||
RtlUnwindEx(
|
||||
_In_opt_ PVOID TargetFrame,
|
||||
_In_opt_ PVOID TargetIp,
|
||||
_In_opt_ struct _EXCEPTION_RECORD *ExceptionRecord,
|
||||
_In_ PVOID ReturnValue,
|
||||
_In_ struct _CONTEXT *ContextRecord,
|
||||
_In_opt_ PUNWIND_HISTORY_TABLE HistoryTable);
|
||||
|
||||
#elif defined(_PPC_)
|
||||
#define CONTEXT_CONTROL 1L
|
||||
#define CONTEXT_FLOATING_POINT 2L
|
||||
|
|
|
@ -28,10 +28,6 @@
|
|||
#define UWOP_SAVE_XMM128_FAR 9
|
||||
#define UWOP_PUSH_MACHFRAME 10
|
||||
|
||||
#define UNW_FLAG_NHANDLER 0
|
||||
#define UNW_FLAG_EHANDLER 1
|
||||
#define UNW_FLAG_UHANDLER 2
|
||||
#define UNW_FLAG_CHAININFO 4
|
||||
|
||||
typedef unsigned char UBYTE;
|
||||
|
||||
|
@ -348,18 +344,17 @@ RtlpTryToUnwindEpilog(
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
PEXCEPTION_ROUTINE
|
||||
NTAPI
|
||||
RtlVirtualUnwind(
|
||||
IN ULONG HandlerType,
|
||||
IN ULONG64 ImageBase,
|
||||
IN ULONG64 ControlPc,
|
||||
IN PRUNTIME_FUNCTION FunctionEntry,
|
||||
IN OUT PCONTEXT Context,
|
||||
OUT PVOID *HandlerData,
|
||||
OUT PULONG64 EstablisherFrame,
|
||||
IN OUT PKNONVOLATILE_CONTEXT_POINTERS ContextPointers)
|
||||
_In_ ULONG HandlerType,
|
||||
_In_ ULONG64 ImageBase,
|
||||
_In_ ULONG64 ControlPc,
|
||||
_In_ PRUNTIME_FUNCTION FunctionEntry,
|
||||
_Inout_ PCONTEXT Context,
|
||||
_Outptr_ PVOID *HandlerData,
|
||||
_Out_ PULONG64 EstablisherFrame,
|
||||
_Inout_ PKNONVOLATILE_CONTEXT_POINTERS ContextPointers)
|
||||
{
|
||||
PUNWIND_INFO UnwindInfo;
|
||||
ULONG_PTR CodeOffset;
|
||||
|
@ -499,14 +494,14 @@ RtlVirtualUnwind(
|
|||
VOID
|
||||
NTAPI
|
||||
RtlUnwindEx(
|
||||
IN ULONG64 TargetFrame,
|
||||
IN ULONG64 TargetIp,
|
||||
IN PEXCEPTION_RECORD ExceptionRecord,
|
||||
IN PVOID ReturnValue,
|
||||
OUT PCONTEXT OriginalContext,
|
||||
IN PUNWIND_HISTORY_TABLE HistoryTable)
|
||||
_In_opt_ PVOID TargetFrame,
|
||||
_In_opt_ PVOID TargetIp,
|
||||
_In_opt_ PEXCEPTION_RECORD ExceptionRecord,
|
||||
_In_ PVOID ReturnValue,
|
||||
_In_ PCONTEXT ContextRecord,
|
||||
_In_opt_ struct _UNWIND_HISTORY_TABLE *HistoryTable)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
__debugbreak();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,10 +74,12 @@ RtlCallVectoredContinueHandlers(
|
|||
IN PCONTEXT Context
|
||||
);
|
||||
|
||||
#ifdef _M_IX86
|
||||
typedef struct _DISPATCHER_CONTEXT
|
||||
{
|
||||
PEXCEPTION_REGISTRATION_RECORD RegistrationPointer;
|
||||
} DISPATCHER_CONTEXT, *PDISPATCHER_CONTEXT;
|
||||
#endif
|
||||
|
||||
/* These provide support for sharing code between User and Kernel RTL */
|
||||
PVOID
|
||||
|
@ -157,6 +159,7 @@ RtlpClearInDbgPrint(
|
|||
|
||||
/* i386/except.S */
|
||||
|
||||
#ifdef _M_IX86
|
||||
EXCEPTION_DISPOSITION
|
||||
NTAPI
|
||||
RtlpExecuteHandlerForException(PEXCEPTION_RECORD ExceptionRecord,
|
||||
|
@ -164,6 +167,7 @@ RtlpExecuteHandlerForException(PEXCEPTION_RECORD ExceptionRecord,
|
|||
PCONTEXT Context,
|
||||
PVOID DispatcherContext,
|
||||
PEXCEPTION_ROUTINE ExceptionHandler);
|
||||
#endif
|
||||
|
||||
EXCEPTION_DISPOSITION
|
||||
NTAPI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue