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.

113 lines
2.0 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. PVOID StartAddress
  40. );
  41. VOID
  42. DbgkExitThread(
  43. NTSTATUS ExitStatus
  44. );
  45. VOID
  46. DbgkExitProcess(
  47. NTSTATUS ExitStatus
  48. );
  49. VOID
  50. DbgkMapViewOfSection(
  51. IN HANDLE SectionHandle,
  52. IN PVOID BaseAddress,
  53. IN ULONG SectionOffset,
  54. IN ULONG_PTR ViewSize
  55. );
  56. VOID
  57. DbgkUnMapViewOfSection(
  58. IN PVOID BaseAddress
  59. );
  60. BOOLEAN
  61. DbgkForwardException (
  62. IN PEXCEPTION_RECORD ExceptionRecord,
  63. IN BOOLEAN DebugException,
  64. IN BOOLEAN SecondChance
  65. );
  66. NTSTATUS
  67. DbgkInitialize (
  68. VOID
  69. );
  70. VOID
  71. DbgkCopyProcessDebugPort (
  72. IN PEPROCESS TargetProcess,
  73. IN PEPROCESS SourceProcess
  74. );
  75. NTSTATUS
  76. DbgkOpenProcessDebugPort (
  77. IN PEPROCESS TargetProcess,
  78. IN KPROCESSOR_MODE PreviousMode,
  79. OUT HANDLE *pHandle
  80. );
  81. NTSTATUS
  82. DbgkClearProcessDebugObject (
  83. IN PEPROCESS Process,
  84. IN PDEBUG_OBJECT SourceDebugObject
  85. );
  86. extern POBJECT_TYPE DbgkDebugObjectType;
  87. #endif // _DBGK_