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.

154 lines
3.1 KiB

  1. /** SVC Defines
  2. *
  3. * Revision history:
  4. *
  5. * bobday 13-Jan-1992 Created
  6. */
  7. /* DBGSVC - DBG SVC calls.
  8. *
  9. * This macro is used by Nlddebug.asm (where N=nothing or 2)
  10. *
  11. */
  12. /* ASM
  13. include bop.inc
  14. dbgsvc macro func
  15. BOP BOP_DEBUGGER
  16. db func
  17. endm
  18. */
  19. //
  20. // Debug event codes
  21. // These need to match the public definition in sdk\inc\vdmdbg.h
  22. //
  23. #define DBG_SEGLOAD 0
  24. #define DBG_SEGMOVE 1
  25. #define DBG_SEGFREE 2
  26. #define DBG_MODLOAD 3
  27. #define DBG_MODFREE 4
  28. #define DBG_SINGLESTEP 5
  29. #define DBG_BREAK 6
  30. #define DBG_GPFAULT 7
  31. #define DBG_DIVOVERFLOW 8
  32. #define DBG_INSTRFAULT 9
  33. #define DBG_TASKSTART 10
  34. #define DBG_TASKSTOP 11
  35. #define DBG_DLLSTART 12
  36. #define DBG_DLLSTOP 13
  37. #define DBG_ATTACH 14
  38. #define DBG_TOOLHELP 15
  39. #define DBG_STACKFAULT 16
  40. #define DBG_WOWINIT 17
  41. #define DBG_TEMPBP 18
  42. #define DBG_MODMOVE 19
  43. #define DBG_INIT 20
  44. #define DBG_GPFAULT2 21
  45. //
  46. // Flags used by DemIsDebug
  47. //
  48. #define ISDBG_DEBUGGEE 1
  49. #define ISDBG_SHOWSVC 2
  50. void
  51. DbgSegmentNotice(
  52. WORD wType,
  53. WORD wModuleSeg,
  54. WORD wLoadSeg,
  55. WORD wNewSeg,
  56. LPSTR lpModuleName,
  57. LPSTR lpModulePath,
  58. DWORD dwImageLen
  59. );
  60. BOOL
  61. DbgIsDebuggee(
  62. void
  63. );
  64. BOOL
  65. DbgInit(
  66. void
  67. );
  68. VOID DbgDosAppStart(WORD, WORD);
  69. BOOL DbgBPInt(VOID);
  70. BOOL DbgTraceInt(VOID);
  71. BOOL DbgFault(ULONG);
  72. VOID VdmPrompt(ULONG, ULONG);
  73. VOID VdmTraceEvent(USHORT, USHORT, ULONG);
  74. /* XLATOFF */
  75. #if DBG
  76. #define DBGTRACE(Type, wData, lData) VdmTraceEvent(Type, wData, lData)
  77. #else
  78. #define DBGTRACE(Type, wData, lData) {}
  79. #endif
  80. /* XLATON */
  81. //
  82. // Events for DbgPrompt()
  83. //
  84. #define DBG_EVENT_HW_INT 1
  85. #define DBG_EVENT_SW_INT 2
  86. //
  87. // Definitions for VdmTraceEvent major code types
  88. //
  89. #define VDMTR_TYPE_KERNEL 0
  90. #define VDMTR_TYPE_DPMI 0x100
  91. #define VDMTR_TYPE_DPMI_SF 0x200
  92. #define VDMTR_TYPE_DPMI_SI 0x300
  93. #define VDMTR_TYPE_DEM 0x400
  94. #define VDMTR_TYPE_WOW 0x500
  95. #define VDMTR_TYPE_VSBD 0x600
  96. #define VDMTR_TYPE_DBG 0x700
  97. #define VDMTR_TYPE_MONITOR 0x800
  98. //
  99. // Definitions for VdmTraceEvent minor code types
  100. //
  101. #define DPMI_SWITCH_STACKS 1
  102. #define DPMI_GENERIC 2
  103. #define DPMI_DISPATCH_INT 3
  104. #define DPMI_HW_INT 4
  105. #define DPMI_SW_INT 5
  106. #define DPMI_INT_IRET16 6
  107. #define DPMI_INT_IRET32 7
  108. #define DPMI_FAULT 8
  109. #define DPMI_DISPATCH_FAULT 9
  110. #define DPMI_FAULT_IRET 10
  111. #define DPMI_OP_EMULATION 11
  112. #define DPMI_DISPATCH_ENTRY 12
  113. #define DPMI_IN_PM 13
  114. #define DPMI_IN_V86 14
  115. #define DPMI_DISPATCH_EXIT 15
  116. #define DPMI_REFLECT_TO_V86 16
  117. #define DPMI_REFLECT_TO_PM 17
  118. #define DEM_EVENT_DISPATCH 1
  119. #define DEM_EVENT_DISPATCH_EXIT 2
  120. #define MONITOR_EVENT_IO 1
  121. #define MONITOR_EVENT_STRING_IO 2
  122. #define MONITOR_EVENT_MEM_ACCESS 3
  123. #define MONITOR_EVENT_INT_ACK 4
  124. #define MONITOR_EVENT_BOP 5
  125. #define MONITOR_EVENT_ERROR 6
  126. #define MONITOR_EVENT_IRQ_13 7
  127. #define MONITOR_CPU_SIMULATE 8
  128. #define MONITOR_CPU_UNSIMULATE 9