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.

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