Source code of Windows XP (NT5)
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.

36 lines
987 B

  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. ULONG64 ulTebAddress = 0;
  10. ULONG ulStackFlags = 0;
  11. ULONG64 ulTopOfRtlFrameList = 0;
  12. ULONG ulNextCookie = 0;
  13. GetTebAddress( &ulTebAddress );
  14. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.Flags", ulStackFlags );
  15. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.ActiveFrame", ulTopOfRtlFrameList );
  16. GetFieldValue( ulTebAddress, "nt!TEB", "ActivationContextStack.NextCookieSequenceNumber", ulNextCookie );
  17. dprintf(
  18. "Current activation stack information in TEB %p:\n"
  19. " Flags : 0x%08lx\n"
  20. " ActiveFrame : 0x%p\n"
  21. " NextCookieSequence : 0x%08lx\n",
  22. ulTebAddress,
  23. ulStackFlags,
  24. ulTopOfRtlFrameList,
  25. ulNextCookie);
  26. DumpActCtxStackFullStack( ulTopOfRtlFrameList );
  27. }