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.

97 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 <windows.h>
  12. #include <wdbgexts.h>
  13. #include <cmnutil.hpp>
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17. #include <dbgeng.h>
  18. #include <dllimp.h>
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. //
  23. // undef the wdbgexts
  24. //
  25. #undef DECLARE_API
  26. #define DECLARE_API(extension) \
  27. CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
  28. #define INIT_API() \
  29. HRESULT Status; \
  30. if ((Status = ExtQuery(Client)) != S_OK) return Status;
  31. #define EXIT_API ExtRelease
  32. // Safe release and NULL.
  33. #define EXT_RELEASE(Unk) \
  34. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  35. // Global variables initialized by query.
  36. extern PDEBUG_ADVANCED g_ExtAdvanced;
  37. extern PDEBUG_CLIENT g_ExtClient;
  38. extern PDEBUG_CONTROL g_ExtControl;
  39. extern PDEBUG_DATA_SPACES2 g_ExtData;
  40. extern PDEBUG_REGISTERS g_ExtRegisters;
  41. extern PDEBUG_SYMBOLS g_ExtSymbols;
  42. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  43. extern ULONG64 STeip;
  44. extern ULONG64 STebp;
  45. extern ULONG64 STesp;
  46. extern ULONG64 EXPRLastDump;
  47. HRESULT
  48. ExtQuery(PDEBUG_CLIENT Client);
  49. void
  50. ExtRelease(void);
  51. // Normal output.
  52. void __cdecl
  53. ExtOut(PCSTR Format, ...);
  54. // Error output.
  55. void __cdecl
  56. ExtErr(PCSTR Format, ...);
  57. // Warning output.
  58. void __cdecl
  59. ExtWarn(PCSTR Format, ...);
  60. // Verbose output.
  61. void __cdecl
  62. ExtVerb(PCSTR Format, ...);
  63. //-----------------------------------------------------------------------------------------
  64. //
  65. // api declaration macros & api access macros
  66. //
  67. //-----------------------------------------------------------------------------------------
  68. extern WINDBG_EXTENSION_APIS ExtensionApis;
  69. extern ULONG TargetMachine;
  70. extern ULONG g_TargetClass;
  71. #ifdef __cplusplus
  72. }
  73. #endif