VisualizerHelpers.cpp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #include "il2cpp-config.h"
  2. #include "il2cpp-class-internals.h"
  3. #include "vm/GlobalMetadataFileInternals.h"
  4. #if _MSC_VER
  5. // These structs aren't actually used anywhere, but they are used by the VS debugger visualizer to help visualize various types
  6. namespace VisualizerHelpers
  7. {
  8. struct Il2CppRawTypeName
  9. {
  10. Il2CppClass t;
  11. };
  12. struct Il2CppRawTypeNameWithoutDeclaringType
  13. {
  14. Il2CppClass t;
  15. };
  16. struct Il2CppGenericParameters_DeclaringTypeHas0Parameters
  17. {
  18. Il2CppGenericContainer c;
  19. };
  20. struct Il2CppGenericParameters_DeclaringTypeHas1Parameters
  21. {
  22. Il2CppGenericContainer c;
  23. };
  24. struct Il2CppGenericParameters_DeclaringTypeHas2Parameters
  25. {
  26. Il2CppGenericContainer c;
  27. };
  28. struct Il2CppGenericParameters_DeclaringTypeHas3Parameters
  29. {
  30. Il2CppGenericContainer c;
  31. };
  32. struct Il2CppGenericParameters_DeclaringTypeHas4Parameters
  33. {
  34. Il2CppGenericContainer c;
  35. };
  36. struct Il2CppGenericParameters_DeclaringTypeHas5Parameters
  37. {
  38. Il2CppGenericContainer c;
  39. };
  40. struct Il2CppGenericParameters
  41. {
  42. Il2CppGenericContainer c;
  43. };
  44. struct Il2CppGenericArguments_DeclaringTypeHas0Arguments
  45. {
  46. Il2CppGenericInst gi;
  47. };
  48. struct Il2CppGenericArguments_DeclaringTypeHas1Arguments
  49. {
  50. Il2CppGenericInst gi;
  51. };
  52. struct Il2CppGenericArguments_DeclaringTypeHas2Arguments
  53. {
  54. Il2CppGenericInst gi;
  55. };
  56. struct Il2CppGenericArguments_DeclaringTypeHas3Arguments
  57. {
  58. Il2CppGenericInst gi;
  59. };
  60. struct Il2CppGenericArguments_DeclaringTypeHas4Arguments
  61. {
  62. Il2CppGenericInst gi;
  63. };
  64. struct Il2CppGenericArguments_DeclaringTypeHas5Arguments
  65. {
  66. Il2CppGenericInst gi;
  67. };
  68. struct Il2CppGenericArguments
  69. {
  70. Il2CppGenericClass gi;
  71. };
  72. struct Il2CppMethodParameters
  73. {
  74. MethodInfo m;
  75. };
  76. struct Il2CppMethodGenericParameters
  77. {
  78. MethodInfo m;
  79. };
  80. struct PreventLinkerFromStrippingTypesFromDebugInfo
  81. {
  82. Il2CppRawTypeName* ___rawTypeName;
  83. Il2CppRawTypeNameWithoutDeclaringType* ___rawTypeNameWithoutDeclaringType;
  84. Il2CppGenericParameters_DeclaringTypeHas0Parameters* ___genericParameters0;
  85. Il2CppGenericParameters_DeclaringTypeHas1Parameters* ___genericParameters1;
  86. Il2CppGenericParameters_DeclaringTypeHas2Parameters* ___genericParameters2;
  87. Il2CppGenericParameters_DeclaringTypeHas3Parameters* ___genericParameters3;
  88. Il2CppGenericParameters_DeclaringTypeHas4Parameters* ___genericParameters4;
  89. Il2CppGenericParameters_DeclaringTypeHas5Parameters* ___genericParameters5;
  90. Il2CppGenericParameters* ___genericParameters;
  91. Il2CppGenericArguments_DeclaringTypeHas0Arguments* ___genericArguments0;
  92. Il2CppGenericArguments_DeclaringTypeHas1Arguments* ___genericArguments1;
  93. Il2CppGenericArguments_DeclaringTypeHas2Arguments* ___genericArguments2;
  94. Il2CppGenericArguments_DeclaringTypeHas3Arguments* ___genericArguments3;
  95. Il2CppGenericArguments_DeclaringTypeHas4Arguments* ___genericArguments4;
  96. Il2CppGenericArguments_DeclaringTypeHas5Arguments* ___genericArguments5;
  97. Il2CppGenericArguments* ___genericArguments;
  98. Il2CppMethodParameters* ___methodParameters;
  99. Il2CppMethodGenericParameters* ___methodGenericParameters;
  100. };
  101. }
  102. // We need to declare a global variable, otherwise compiler strips all type information from PDBs, and in result debugger can't visualize them
  103. extern "C" VisualizerHelpers::PreventLinkerFromStrippingTypesFromDebugInfo * ____visualizerHelpersPreventLinkerStripping = NULL;
  104. #endif