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.

102 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. kqueue.c
  5. Abstract:
  6. Dumps KQUEUEs.
  7. Author:
  8. Keith Moore (keithmo) 11-Nov-1999
  9. Environment:
  10. User Mode.
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. //
  15. // Public functions.
  16. //
  17. DECLARE_API( kqueue )
  18. /*++
  19. Routine Description:
  20. Dumps KQUEUEs.
  21. Arguments:
  22. None.
  23. Return Value:
  24. None.
  25. --*/
  26. {
  27. ULONG_PTR address = 0;
  28. ULONG result;
  29. ULONG_PTR flags = 0;
  30. KQUEUE localKQueue;
  31. ULONG64 address64 = 0, flags64 = 0;
  32. SNAPSHOT_EXTENSION_DATA();
  33. //
  34. // Snag the address from the command line.
  35. //
  36. if (! GetExpressionEx(args, &address64, &args))
  37. {
  38. PrintUsage( "kqueue" );
  39. return;
  40. }
  41. GetExpressionEx(args, &flags64, &args);
  42. address = (ULONG_PTR) address64;
  43. flags = (ULONG_PTR) flags64;
  44. //
  45. // Read the kqueue.
  46. //
  47. if (!ReadMemory(
  48. address,
  49. &localKQueue,
  50. sizeof(localKQueue),
  51. &result
  52. ))
  53. {
  54. dprintf(
  55. "kqueue: cannot read KQUEUE @ %p\n",
  56. address
  57. );
  58. return;
  59. }
  60. DumpKernelQueue(
  61. "",
  62. "kqueue: ",
  63. address,
  64. &localKQueue,
  65. (ULONG)flags
  66. );
  67. } // kqueue