https://git.reactos.org/?p=reactos.git;a=commitdiff;h=01dc54056f0a62586794d…
commit 01dc54056f0a62586794d290f414a3ff7fc9203a
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Mon Apr 13 23:37:25 2020 +0200
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Apr 26 13:44:01 2020 +0200
[NDK] Add STACK_TRACE_DATABASE definition
---
sdk/include/ndk/rtltypes.h | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h
index 42178ec0f7a..3ceade4b02d 100644
--- a/sdk/include/ndk/rtltypes.h
+++ b/sdk/include/ndk/rtltypes.h
@@ -1736,11 +1736,48 @@ typedef struct _RTL_STACK_TRACE_ENTRY
PVOID BackTrace[32];
} RTL_STACK_TRACE_ENTRY, *PRTL_STACK_TRACE_ENTRY;
+
typedef struct _STACK_TRACE_DATABASE
{
- RTL_CRITICAL_SECTION CriticalSection;
+ union
+ {
+ PVOID Lock;
+
+ /* Padding for ERESOURCE */
+#if defined(_M_AMD64)
+ UCHAR Padding[0x68];
+#else
+ UCHAR Padding[56];
+#endif
+ } Lock;
+
+ BOOLEAN DumpInProgress;
+
+ PVOID CommitBase;
+ PVOID CurrentLowerCommitLimit;
+ PVOID CurrentUpperCommitLimit;
+
+ PCHAR NextFreeLowerMemory;
+ PCHAR NextFreeUpperMemory;
+
+ ULONG NumberOfEntriesAdded;
+ ULONG NumberOfAllocationFailures;
+ PRTL_STACK_TRACE_ENTRY* EntryIndexArray;
+
+ ULONG NumberOfBuckets;
+ PRTL_STACK_TRACE_ENTRY Buckets[ANYSIZE_ARRAY];
} STACK_TRACE_DATABASE, *PSTACK_TRACE_DATABASE;
+// Validate that our padding is big enough:
+#ifndef NTOS_MODE_USER
+#if defined(_M_AMD64)
+C_ASSERT(sizeof(ERESOURCE) <= 0x68);
+#else
+C_ASSERT(sizeof(ERESOURCE) <= 56);
+#endif
+#endif
+
+
//
// Trace Database
//