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.

47 lines
1.6 KiB

  1. #ifndef _H_DBG_FNCALL_HIST_
  2. #define _H_DBG_FNCALL_HIST_
  3. #ifdef DC_DEBUG
  4. // This defines how many slots are in the function call history
  5. #define DBG_DD_FNCALL_HIST_MAX 50
  6. typedef struct tagDBG_DD_FUNCALL_HISTORY
  7. {
  8. INT32 fnID;
  9. DWORD_PTR param1;
  10. DWORD_PTR param2;
  11. DWORD_PTR param3;
  12. DWORD_PTR param4;
  13. } DBG_DD_FUNCALL_HISTORY, *PDBG_DD_FUNCALL_HISTORY;
  14. // These are the IDs to be used when calling the macro below
  15. enum {
  16. DBG_DD_FNCALL_DRV_CONNECT,
  17. DBG_DD_FNCALL_DRV_DISCONNECT,
  18. DBG_DD_FNCALL_DRV_RECONNECT,
  19. DBG_DD_FNCALL_DRV_SHADOWCONNECT,
  20. DBG_DD_FNCALL_DRV_SHADOWDISCONNECT,
  21. DBG_DD_FNCALL_DRV_ASSERTMODE,
  22. DBG_DD_ALLOC_SECTIONOBJ,
  23. DBG_DD_FREE_SECTIONOBJ_SURFACE,
  24. DBG_DD_FREE_SECTIONOBJ_DDTERM,
  25. DBG_DD_FNCALL_DRV_ENABLEDIRECTDRAW,
  26. DBG_DD_FNCALL_DRV_DISABLEDIRECTDRAW
  27. };
  28. // Use this to add to the history
  29. #define DBG_DD_FNCALL_HIST_ADD( ID, PARAM1, PARAM2, PARAM3, PARAM4 ) \
  30. DrvDebugPrint( "FNCALL_HIST: FN[%x] 1[%x] 2[%x] 3[%x] 4[%x]\n", \
  31. (ID), (PARAM1), (PARAM2), (PARAM3), (PARAM4) ); \
  32. dbg_ddFnCallHistory[ dbg_ddFnCallHistoryIndex ].fnID = (ID); \
  33. dbg_ddFnCallHistory[ dbg_ddFnCallHistoryIndex ].param1 = (DWORD_PTR)(PARAM1); \
  34. dbg_ddFnCallHistory[ dbg_ddFnCallHistoryIndex ].param2 = (DWORD_PTR)(PARAM2); \
  35. dbg_ddFnCallHistory[ dbg_ddFnCallHistoryIndex ].param3 = (DWORD_PTR)(PARAM3); \
  36. dbg_ddFnCallHistory[ dbg_ddFnCallHistoryIndex ].param4 = (DWORD_PTR)(PARAM4); \
  37. dbg_ddFnCallHistoryIndex = \
  38. (dbg_ddFnCallHistoryIndex + 1) % dbg_ddFnCallHistoryIndexMAX;
  39. #endif // DC_DEBUG
  40. #endif // _H_DBG_FNCALL_HIST_