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.

114 lines
2.1 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. dbgk.h
  5. Abstract:
  6. This header file describes public data structures and functions
  7. that make up the kernel mode portion of the Dbg subsystem.
  8. Author:
  9. Mark Lucovsky (markl) 19-Jan-1990
  10. Revision History:
  11. --*/
  12. #ifndef _DBGK_
  13. #define _DBGK_
  14. //
  15. // Define the debug object thats used to atatch to processes that are being debugged.
  16. //
  17. #define DEBUG_OBJECT_DELETE_PENDING (0x1) // Debug object is delete pending.
  18. #define DEBUG_OBJECT_KILL_ON_CLOSE (0x2) // Kill all debugged processes on close
  19. typedef struct _DEBUG_OBJECT {
  20. //
  21. // Event thats set when the EventList is populated.
  22. //
  23. KEVENT EventsPresent;
  24. //
  25. // Mutex to protect the structure
  26. //
  27. FAST_MUTEX Mutex;
  28. //
  29. // Queue of events waiting for debugger intervention
  30. //
  31. LIST_ENTRY EventList;
  32. //
  33. // Flags for the object
  34. //
  35. ULONG Flags;
  36. } DEBUG_OBJECT, *PDEBUG_OBJECT;
  37. VOID
  38. DbgkCreateThread(
  39. PETHREAD Thread,
  40. PVOID StartAddress
  41. );
  42. VOID
  43. DbgkExitThread(
  44. NTSTATUS ExitStatus
  45. );
  46. VOID
  47. DbgkExitProcess(
  48. NTSTATUS ExitStatus
  49. );
  50. VOID
  51. DbgkMapViewOfSection(
  52. IN HANDLE SectionHandle,
  53. IN PVOID BaseAddress,
  54. IN ULONG SectionOffset,
  55. IN ULONG_PTR ViewSize
  56. );
  57. VOID
  58. DbgkUnMapViewOfSection(
  59. IN PVOID BaseAddress
  60. );
  61. BOOLEAN
  62. DbgkForwardException (
  63. IN PEXCEPTION_RECORD ExceptionRecord,
  64. IN BOOLEAN DebugException,
  65. IN BOOLEAN SecondChance
  66. );
  67. NTSTATUS
  68. DbgkInitialize (
  69. VOID
  70. );
  71. VOID
  72. DbgkCopyProcessDebugPort (
  73. IN PEPROCESS TargetProcess,
  74. IN PEPROCESS SourceProcess
  75. );
  76. NTSTATUS
  77. DbgkOpenProcessDebugPort (
  78. IN PEPROCESS TargetProcess,
  79. IN KPROCESSOR_MODE PreviousMode,
  80. OUT HANDLE *pHandle
  81. );
  82. NTSTATUS
  83. DbgkClearProcessDebugObject (
  84. IN PEPROCESS Process,
  85. IN PDEBUG_OBJECT SourceDebugObject
  86. );
  87. extern POBJECT_TYPE DbgkDebugObjectType;
  88. #endif // _DBGK_