Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. stktrace.h
  5. Abstract:
  6. This header file defines the format of the stack trace data base
  7. used to track caller backtraces. This is a header file so debugger
  8. extensions can lookup entries in the database remotely.
  9. Author:
  10. Steve Wood (stevewo) 13-Sep-1992
  11. Revision History:
  12. --*/
  13. #ifndef _STKTRACE_H_
  14. #define _STKTRACE_H_
  15. //
  16. // RTL_STACK_TRACE_ENTRY
  17. //
  18. typedef struct _RTL_STACK_TRACE_ENTRY {
  19. struct _RTL_STACK_TRACE_ENTRY * HashChain;
  20. ULONG TraceCount;
  21. USHORT Index;
  22. USHORT Depth;
  23. PVOID BackTrace [MAX_STACK_DEPTH];
  24. } RTL_STACK_TRACE_ENTRY, *PRTL_STACK_TRACE_ENTRY;
  25. //
  26. // RTL_STACK_TRACE_DATABASE
  27. //
  28. typedef struct _STACK_TRACE_DATABASE {
  29. union {
  30. RTL_CRITICAL_SECTION CriticalSection;
  31. ERESOURCE Resource;
  32. PVOID Lock; // real lock (the other two kept for compatibility)
  33. };
  34. PVOID Reserved[3]; // fields no longer used but kept for compatibility
  35. BOOLEAN PreCommitted;
  36. BOOLEAN DumpInProgress;
  37. PVOID CommitBase;
  38. PVOID CurrentLowerCommitLimit;
  39. PVOID CurrentUpperCommitLimit;
  40. PCHAR NextFreeLowerMemory;
  41. PCHAR NextFreeUpperMemory;
  42. ULONG NumberOfEntriesLookedUp;
  43. ULONG NumberOfEntriesAdded;
  44. PRTL_STACK_TRACE_ENTRY *EntryIndexArray; // Indexed by [-1 .. -NumberOfEntriesAdded]
  45. ULONG NumberOfBuckets;
  46. PRTL_STACK_TRACE_ENTRY Buckets [1];
  47. } STACK_TRACE_DATABASE, *PSTACK_TRACE_DATABASE;
  48. PSTACK_TRACE_DATABASE
  49. RtlpAcquireStackTraceDataBase (
  50. VOID
  51. );
  52. VOID
  53. RtlpReleaseStackTraceDataBase (
  54. VOID
  55. );
  56. NTSTATUS
  57. RtlInitializeStackTraceDataBase(
  58. IN PVOID CommitBase,
  59. IN SIZE_T CommitSize,
  60. IN SIZE_T ReserveSize
  61. );
  62. #endif // _STKTRACE_H_