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.

94 lines
2.1 KiB

  1. /*++
  2. Copyright (c) 1993-1999 Microsoft Corporation
  3. Module Name:
  4. precomp.h
  5. Abstract:
  6. This header file is used to cause the correct machine/platform specific
  7. data structures to be used when compiling for a non-hosted platform.
  8. --*/
  9. // This is a 64 bit aware debugger extension
  10. #define KDEXT_64BIT
  11. #include <nt.h>
  12. #include <ntrtl.h>
  13. #include <nturtl.h>
  14. #include <windows.h>
  15. #include <wdbgexts.h>
  16. #include <stdio.h>
  17. #include <stdlib.h>
  18. #include <string.h>
  19. #include <dbgeng.h>
  20. #include "extsfns.h"
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. //
  25. // undef the wdbgexts
  26. //
  27. #undef DECLARE_API
  28. #define DECLARE_API(extension) \
  29. CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
  30. #define INIT_API() \
  31. HRESULT Status; \
  32. if ((Status = ExtQuery(Client)) != S_OK) return Status;
  33. #define EXIT_API ExtRelease
  34. // Safe release and NULL.
  35. #define EXT_RELEASE(Unk) \
  36. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  37. #ifndef EXTENSION_API
  38. #define EXTENSION_API( name ) \
  39. HRESULT _EFN_##name
  40. #endif // EXTENSION_API
  41. // Global variables initialized by query.
  42. extern PDEBUG_ADVANCED g_ExtAdvanced;
  43. extern PDEBUG_CLIENT g_ExtClient;
  44. extern PDEBUG_CONTROL g_ExtControl;
  45. extern PDEBUG_DATA_SPACES g_ExtData;
  46. extern PDEBUG_REGISTERS g_ExtRegisters;
  47. extern PDEBUG_SYMBOLS2 g_ExtSymbols;
  48. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  49. extern ULONG64 STeip;
  50. extern ULONG64 STebp;
  51. extern ULONG64 STesp;
  52. extern ULONG64 EXPRLastDump;
  53. HRESULT
  54. ExtQuery(PDEBUG_CLIENT Client);
  55. void
  56. ExtRelease(void);
  57. //-----------------------------------------------------------------------------------------
  58. //
  59. // api declaration macros & api access macros
  60. //
  61. //-----------------------------------------------------------------------------------------
  62. extern WINDBG_EXTENSION_APIS ExtensionApis;
  63. extern ULONG TargetMachine;
  64. extern ULONG g_TargetClass;
  65. extern ULONG g_TargetQual;
  66. extern ULONG g_TargetBuild;
  67. #ifdef __cplusplus
  68. }
  69. #endif