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.

73 lines
1.7 KiB

  1. #pragma once
  2. #include "sxstypes.h"
  3. class COutOfMemory { };
  4. __declspec(noreturn) inline void ThrowOutOfMemory()
  5. {
  6. throw COutOfMemory();
  7. }
  8. #define DUMPACTCTX_HEADER (0x00000001)
  9. #define DUMPACTCTX_DATA (0x00000002)
  10. #define DUMPACTCTXDATA_FLAG_FULL (0x00010000)
  11. #define NUMBER_OF(x) ( (sizeof(x) / sizeof(*x) ) )
  12. typedef struct PRIVATE_ACTIVATION_CONTEXT {
  13. LONG RefCount;
  14. ULONG Flags;
  15. ULONG64 ActivationContextData; // _ACTIVATION_CONTEXT_DATA
  16. ULONG64 NotificationRoutine; // PACTIVATION_CONTEXT_NOTIFY_ROUTINE
  17. ULONG64 NotificationContext;
  18. ULONG SentNotifications[8];
  19. ULONG DisabledNotifications[8];
  20. ULONG64 StorageMap; // ASSEMBLY_STORAGE_MAP
  21. PVOID InlineStorageMapEntries[32]; // PASSEMBLY_STORAGE_MAP_ENTRY
  22. } PRIVATE_ACTIVATION_CONTEXT;
  23. // then the unicode string struct is probably not defined either
  24. typedef struct _UNICODE_STRING {
  25. USHORT Length;
  26. USHORT MaximumLength;
  27. PWSTR Buffer;
  28. } UNICODE_STRING, *PUNICODE_STRING;
  29. BOOL
  30. DumpActivationContextStackFrame(
  31. PCSTR pcsLineHeader,
  32. ULONG64 ulStackFrameAddress,
  33. ULONG ulDepth,
  34. DWORD dwFlags
  35. );
  36. BOOL
  37. DumpActCtxData(
  38. PCSTR LineHeader,
  39. const ULONG64 ActCtxDataAddressInDebugeeSpace,
  40. ULONG ulFlags
  41. );
  42. BOOL
  43. DumpActCtx(
  44. const ULONG64 ActCtxAddressInDebugeeSpace,
  45. ULONG ulFlags
  46. );
  47. BOOL
  48. GetActiveActivationContextData(
  49. PULONG64 pulActiveActCtx
  50. );
  51. BOOL
  52. DumpActCtxStackFullStack(
  53. ULONG64 ulFirstStackFramePointer
  54. );
  55. VOID
  56. DbgExtPrintActivationContextData(
  57. BOOL fFull,
  58. PCACTIVATION_CONTEXT_DATA Data,
  59. PCWSTR rbuffPLP
  60. );