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.

43 lines
1.1 KiB

  1. #include "windows.h"
  2. #define KDEXT_64BIT
  3. #include "wdbgexts.h"
  4. #include "stdlib.h"
  5. #include "stdio.h"
  6. #include "fusiondbgext.h"
  7. DECLARE_API( actctxstack )
  8. {
  9. try
  10. {
  11. ULONG64 ulTebAddress = 0;
  12. ULONG ulStackFlags = 0;
  13. ULONG64 ulTopOfRtlFrameList = 0;
  14. ULONG ulNextCookie = 0;
  15. GetTebAddress( &ulTebAddress );
  16. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.Flags", ulStackFlags );
  17. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.ActiveFrame", ulTopOfRtlFrameList );
  18. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.NextCookieSequenceNumber", ulNextCookie );
  19. dprintf(
  20. "Current activation stack information in TEB %p:\n"
  21. " Flags : 0x%08lx\n"
  22. " ActiveFrame : 0x%p\n"
  23. " NextCookieSequence : 0x%08lx\n",
  24. ulTebAddress,
  25. ulStackFlags,
  26. ulTopOfRtlFrameList,
  27. ulNextCookie);
  28. DumpActCtxStackFullStack( ulTopOfRtlFrameList );
  29. }
  30. catch (const COutOfMemory &)
  31. {
  32. dprintf("Out of memory\n");
  33. }
  34. }