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.

95 lines
2.0 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 "bugcheck.h"
  21. //#include "kextfn.h"
  22. #include "extsfns.h"
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. //
  27. // undef the wdbgexts
  28. //
  29. #undef DECLARE_API
  30. #define DECLARE_API(extension) \
  31. CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT Client, PCSTR args)
  32. #define INIT_API() \
  33. HRESULT Status; \
  34. if ((Status = ExtQuery(Client)) != S_OK) return Status;
  35. #define EXIT_API ExtRelease
  36. // Safe release and NULL.
  37. #define EXT_RELEASE(Unk) \
  38. ((Unk) != NULL ? ((Unk)->Release(), (Unk) = NULL) : NULL)
  39. #ifndef EXTENSION_API
  40. #define EXTENSION_API( name ) \
  41. HRESULT _EFN_##name
  42. #endif // EXTENSION_API
  43. // Global variables initialized by query.
  44. extern PDEBUG_ADVANCED g_ExtAdvanced;
  45. extern PDEBUG_CLIENT g_ExtClient;
  46. extern PDEBUG_CONTROL g_ExtControl;
  47. extern PDEBUG_DATA_SPACES g_ExtData;
  48. extern PDEBUG_REGISTERS g_ExtRegisters;
  49. extern PDEBUG_SYMBOLS2 g_ExtSymbols;
  50. extern PDEBUG_SYSTEM_OBJECTS g_ExtSystem;
  51. extern ULONG64 STeip;
  52. extern ULONG64 STebp;
  53. extern ULONG64 STesp;
  54. extern ULONG64 EXPRLastDump;
  55. HRESULT
  56. ExtQuery(PDEBUG_CLIENT Client);
  57. void
  58. ExtRelease(void);
  59. //-----------------------------------------------------------------------------------------
  60. //
  61. // api declaration macros & api access macros
  62. //
  63. //-----------------------------------------------------------------------------------------
  64. extern WINDBG_EXTENSION_APIS ExtensionApis;
  65. extern ULONG TargetMachine;
  66. extern ULONG g_TargetClass;
  67. extern ULONG g_TargetQual;
  68. #ifdef __cplusplus
  69. }
  70. #endif