mirror of
https://github.com/reactos/reactos.git
synced 2024-07-06 12:45:16 +00:00
[DEBUG.H] Add a _WARN macro to emit compiler warning messages (also adds __STRLINE__ macro, being resolved to the current line number as a string token)
[NTOSKRNL] Fix some x64 issues and warn about unimplemented session space stuff on x64 svn path=/trunk/; revision=60327
This commit is contained in:
parent
3bc1b43dc1
commit
615266ca06
|
@ -230,4 +230,18 @@ do { \
|
||||||
#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x))
|
#define ASSERT_IRQL_EQUAL(x) ASSERT(KeGetCurrentIrql()==(x))
|
||||||
#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x))
|
#define ASSERT_IRQL_LESS(x) ASSERT(KeGetCurrentIrql()<(x))
|
||||||
|
|
||||||
|
#define __STRING2__(x) #x
|
||||||
|
#define __STRING__(x) __STRING2__(x)
|
||||||
|
#define __STRLINE__ __STRING__(__LINE__)
|
||||||
|
|
||||||
|
#define __TOKENPASTE2__(x, y) x ## y
|
||||||
|
#define __TOKENPASTE__(x, y) __TOKENPASTE2__(x, y)
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define _WARN(msg) __pragma(message("WARNING! Line " __STRLINE__ ": " msg))
|
||||||
|
#else
|
||||||
|
#define _WARN1(_func1, _func2, _msg) void __attribute__((warning (_msg))) _func1(void); void __attribute__((used)) _func2(void) { _func1(); }
|
||||||
|
#define _WARN(_msg) _WARN1(__TOKENPASTE__(__warn_func1__, __LINE__), __TOKENPASTE__(__warn_func2__, __LINE__), _msg)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __INTERNAL_DEBUG */
|
#endif /* __INTERNAL_DEBUG */
|
||||||
|
|
|
@ -32,7 +32,7 @@ MiCheckForUserStackOverflow(IN PVOID Address,
|
||||||
PETHREAD CurrentThread = PsGetCurrentThread();
|
PETHREAD CurrentThread = PsGetCurrentThread();
|
||||||
PTEB Teb = CurrentThread->Tcb.Teb;
|
PTEB Teb = CurrentThread->Tcb.Teb;
|
||||||
PVOID StackBase, DeallocationStack, NextStackAddress;
|
PVOID StackBase, DeallocationStack, NextStackAddress;
|
||||||
ULONG GuranteedSize;
|
SIZE_T GuranteedSize;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/* Do we own the address space lock? */
|
/* Do we own the address space lock? */
|
||||||
|
@ -116,7 +116,7 @@ NTAPI
|
||||||
MiAccessCheck(IN PMMPTE PointerPte,
|
MiAccessCheck(IN PMMPTE PointerPte,
|
||||||
IN BOOLEAN StoreInstruction,
|
IN BOOLEAN StoreInstruction,
|
||||||
IN KPROCESSOR_MODE PreviousMode,
|
IN KPROCESSOR_MODE PreviousMode,
|
||||||
IN ULONG ProtectionCode,
|
IN ULONG_PTR ProtectionCode,
|
||||||
IN PVOID TrapFrame,
|
IN PVOID TrapFrame,
|
||||||
IN BOOLEAN LockHeld)
|
IN BOOLEAN LockHeld)
|
||||||
{
|
{
|
||||||
|
@ -1496,7 +1496,7 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if (_MI_PAGING_LEVELS == 2)
|
||||||
/* Check if this was a session PTE that needs to remap the session PDE */
|
/* Check if this was a session PTE that needs to remap the session PDE */
|
||||||
if (MI_IS_SESSION_PTE(Address))
|
if (MI_IS_SESSION_PTE(Address))
|
||||||
{
|
{
|
||||||
|
@ -1512,6 +1512,11 @@ MmArmAccessFault(IN BOOLEAN StoreInstruction,
|
||||||
6);
|
6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
|
||||||
|
_WARN("Session space stuff is not implemented yet!")
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Check for a fault on the page table or hyperspace */
|
/* Check for a fault on the page table or hyperspace */
|
||||||
if (MI_IS_PAGE_TABLE_OR_HYPER_ADDRESS(Address))
|
if (MI_IS_PAGE_TABLE_OR_HYPER_ADDRESS(Address))
|
||||||
|
@ -1970,7 +1975,7 @@ UserFault:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Get the protection code and check if this is a proto PTE */
|
/* Get the protection code and check if this is a proto PTE */
|
||||||
ProtectionCode = TempPte.u.Soft.Protection;
|
ProtectionCode = (ULONG)TempPte.u.Soft.Protection;
|
||||||
if (TempPte.u.Soft.Prototype)
|
if (TempPte.u.Soft.Prototype)
|
||||||
{
|
{
|
||||||
/* Do we need to go find the real PTE? */
|
/* Do we need to go find the real PTE? */
|
||||||
|
|
Loading…
Reference in a new issue