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.

86 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. globals.h
  5. Abstract:
  6. This module implements all global variables used in dbghelp.dll
  7. Author:
  8. Pat Styles (patst) 14-July-2000
  9. Revision History:
  10. --*/
  11. #ifdef GLOBALS
  12. #include <private.h>
  13. #include <symbols.h>
  14. #endif
  15. typedef struct {
  16. HINSTANCE hinst;
  17. HANDLE hHeap;
  18. DWORD tlsIndex;
  19. #ifdef IMAGEHLP_HEAP_DEBUG
  20. LIST_ENTRY HeapHeader;
  21. ULONG_PTR TotalMemory;
  22. ULONG TotalAllocs;
  23. #endif
  24. OSVERSIONINFO OSVerInfo;
  25. API_VERSION ApiVersion;
  26. API_VERSION AppVersion;
  27. ULONG MachineType;
  28. #ifdef BUILD_DBGHELP
  29. HINSTANCE hSrv;
  30. CHAR szSrvName[_MAX_PATH * 2];
  31. LPSTR szSrvParams;
  32. PSYMBOLSERVERPROC fnSymbolServer;
  33. PSYMBOLSERVERCLOSEPROC fnSymbolServerClose;
  34. PSYMBOLSERVERSETOPTIONSPROC fnSymbolServerSetOptions;
  35. DWORD cProcessList;
  36. LIST_ENTRY ProcessList;
  37. BOOL SymInitialized;
  38. DWORD SymOptions;
  39. ULONG LastSymLoadError;
  40. char DebugToken[MAX_SYM_NAME + 1];
  41. PREAD_PROCESS_MEMORY_ROUTINE ImagepUserReadMemory32;
  42. PFUNCTION_TABLE_ACCESS_ROUTINE ImagepUserFunctionTableAccess32;
  43. PGET_MODULE_BASE_ROUTINE ImagepUserGetModuleBase32;
  44. PTRANSLATE_ADDRESS_ROUTINE ImagepUserTranslateAddress32;
  45. #endif
  46. } GLOBALS, *PGLOBALS;
  47. typedef struct {
  48. DWORD tid;
  49. #ifdef BUILD_DBGHELP
  50. PREAD_PROCESS_MEMORY_ROUTINE ImagepUserReadMemory32;
  51. PFUNCTION_TABLE_ACCESS_ROUTINE ImagepUserFunctionTableAccess32;
  52. PGET_MODULE_BASE_ROUTINE ImagepUserGetModuleBase32;
  53. PTRANSLATE_ADDRESS_ROUTINE ImagepUserTranslateAddress32;
  54. IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY AlphaFunctionEntry64;
  55. BOOL DebugFunctionEntries;
  56. class Ia64FunctionEntryCache* Ia64FunctionEntries;
  57. class Amd64FunctionEntryCache* Amd64FunctionEntries;
  58. class Axp32FunctionEntryCache* Axp32FunctionEntries;
  59. class Axp64FunctionEntryCache* Axp64FunctionEntries;
  60. IMAGE_IA64_RUNTIME_FUNCTION_ENTRY Ia64FunctionEntry;
  61. _IMAGE_RUNTIME_FUNCTION_ENTRY Amd64FunctionEntry;
  62. IMAGE_ALPHA64_RUNTIME_FUNCTION_ENTRY Axp64FunctionEntry;
  63. IMAGE_FUNCTION_ENTRY FunctionEntry32;
  64. IMAGE_FUNCTION_ENTRY64 FunctionEntry64;
  65. VWNDIA64_UNWIND_CONTEXT UnwindContext[VWNDIA64_UNWIND_CONTEXT_TABLE_SIZE];
  66. UINT UnwindContextNew;
  67. #endif
  68. } TLS, *PTLS;
  69. extern GLOBALS g;
  70. extern PTLS GetTlsPtr(void);
  71. #define tlsvar(a) (GetTlsPtr()->a)