Lua_5.1.natvis 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  3. <Type Name="CScriptTable">
  4. <DisplayString Condition="m_nRef == -1">Deleted Ref</DisplayString>
  5. <DisplayString Condition="m_nRef == 0">NULL Ref</DisplayString>
  6. <DisplayString Condition="m_nRef > 0 &amp;&amp; (m_nRef &lt; L->l_G->l_registry.value.gc->h.sizearray + 1)">{L->l_G->l_registry.value.gc->h.array[m_nRef - 1]}</DisplayString>
  7. <DisplayString Condition="!(m_nRef > 0 &amp;&amp; (m_nRef &lt; L->l_G->l_registry.value.gc->h.sizearray + 1))">Ref is in the hash part of registry</DisplayString>
  8. <Expand>
  9. <Item Name="Ref">m_nRef</Item>
  10. <Item Name="Value" Condition="m_nRef &lt; L->l_G->l_registry.value.gc->h.sizearray + 1">L->l_G->l_registry.value.gc->h.array[m_nRef - 1]</Item>
  11. <Item Name="Value" Condition="!(m_nRef &lt; L->l_G->l_registry.value.gc->h.sizearray + 1)">L->l_G->l_registry</Item>
  12. <Item Name="Lua Context">L</Item>
  13. </Expand>
  14. </Type>
  15. <Type Name="lua_State">
  16. <DisplayString Condition="ci->func->tt == 6 &amp;&amp; ci->func->value.gc->cl.c.isC">lua_State (From C function)</DisplayString>
  17. <DisplayString Condition="ci->func->tt == 6 &amp;&amp; !ci->func->value.gc->cl.c.isC">lua_State (From Lua function)</DisplayString>
  18. <DisplayString Condition="ci->func->tt != 6">lua_State</DisplayString>
  19. <Expand>
  20. <Item Name="Stack Size">top - base</Item>
  21. <IndexListItems>
  22. <Size>top - base</Size>
  23. <ValueNode>base[$i]</ValueNode>
  24. </IndexListItems>
  25. <Item Name="Globals">l_gt</Item>
  26. <Item Name="Registry">l_G->l_registry</Item>
  27. <Synthetic Name="Call stack">
  28. <DisplayString>Size {(ci - base_ci) + 1}</DisplayString>
  29. <Expand>
  30. <IndexListItems>
  31. <Size>(ci - base_ci) + 1</Size>
  32. <ValueNode>base_ci[(ci - base_ci) - $i]</ValueNode>
  33. </IndexListItems>
  34. </Expand>
  35. </Synthetic>
  36. </Expand>
  37. </Type>
  38. <Type Name="CallInfo">
  39. <DisplayString Condition="func->tt == 6 &amp;&amp; !func->value.gc->cl.l.isC">File {func->value.gc->cl.l.p->source,na} line {func->value.gc->cl.l.p->lineinfo[savedpc - func->value.gc->cl.l.p->code - 1]}</DisplayString>
  40. <DisplayString>{func,na}</DisplayString>
  41. <Expand>
  42. <Item Name="Function">func,na</Item>
  43. <Item Name="Stack Size">top - base</Item>
  44. <IndexListItems>
  45. <Size>top - base</Size>
  46. <ValueNode>base[$i]</ValueNode>
  47. </IndexListItems>
  48. </Expand>
  49. </Type>
  50. <Type Name="lua_TValue">
  51. <DisplayString Condition="tt == 0">Nil</DisplayString>
  52. <DisplayString Condition="tt == 1">{(bool) value.b}</DisplayString>
  53. <DisplayString Condition="tt == 2">Light Userdata {value.p}</DisplayString>
  54. <DisplayString Condition="tt == 3">{value.n}</DisplayString>
  55. <DisplayString Condition="tt == 4">{value.gc->ts}</DisplayString>
  56. <DisplayString Condition="tt == 5">{value.gc->h}</DisplayString>
  57. <DisplayString Condition="tt == 6">{value.gc->cl}</DisplayString>
  58. <DisplayString Condition="tt == 7">{value.gc->u}</DisplayString>
  59. <DisplayString Condition="tt == 8">Thread {value.gc->th}</DisplayString>
  60. <DisplayString>Unknown</DisplayString>
  61. <Expand>
  62. <Item Name="Light Userdata" Condition="tt == 2">value.p</Item>
  63. <Item Name="Table" Condition="tt == 5">value.gc->h</Item>
  64. <Item Name="Function" Condition="tt == 6">value.gc->cl</Item>
  65. <Item Name="Userdata" Condition="tt == 7">value.gc->u</Item>
  66. <Item Name="Thread" Condition="tt == 8">value.gc->th</Item>
  67. </Expand>
  68. </Type>
  69. <Type Name="TString">
  70. <DisplayString>{(const char *) (this + 1), s}</DisplayString>
  71. </Type>
  72. <Type Name="Table">
  73. <DisplayString Condition="sizearray != 0 || lsizenode != 0 || node->i_key.tvk.tt != 0 || node->i_val.tt != 0">Lua Table</DisplayString>
  74. <DisplayString Condition="sizearray == 0 &amp;&amp; lsizenode == 0">Empty Lua Table</DisplayString>
  75. <Expand>
  76. <Item Name="Metatable" Condition="metatable!=0">metatable</Item>
  77. <Synthetic Name="Array part" Condition="sizearray != 0">
  78. <DisplayString>{sizearray} elements</DisplayString>
  79. <Expand>
  80. <Item Name="Size">sizearray</Item>
  81. <IndexListItems>
  82. <Size>sizearray</Size>
  83. <ValueNode>array[$i]</ValueNode>
  84. </IndexListItems>
  85. </Expand>
  86. </Synthetic>
  87. <Synthetic Name="Hash part" Condition="lsizenode != 0 || node->i_key.tvk.tt != 0 || node->i_val.tt != 0">
  88. <DisplayString>{1 &lt;&lt; lsizenode} elements</DisplayString>
  89. <Expand>
  90. <Item Name="Size">1 &lt;&lt; lsizenode</Item>
  91. <IndexListItems>
  92. <Size>1 &lt;&lt; lsizenode</Size>
  93. <ValueNode>node[$i]</ValueNode>
  94. </IndexListItems>
  95. </Expand>
  96. </Synthetic>
  97. </Expand>
  98. </Type>
  99. <Type Name="Node">
  100. <DisplayString Condition="i_key.tvk.tt == 0 &amp;&amp; i_val.tt == 0">Empty</DisplayString>
  101. <DisplayString Condition="i_key.tvk.tt != 0 || i_val.tt != 0">{i_key.tvk} -> {i_val}</DisplayString>
  102. <Expand>
  103. <Item Name="Key" Condition="i_key.tvk.tt != 0 || i_val.tt != 0">i_key.tvk</Item>
  104. <Item Name="Val" Condition="i_key.tvk.tt != 0 || i_val.tt != 0">i_val</Item>
  105. </Expand>
  106. </Type>
  107. <Type Name="TKey">
  108. <DisplayString>{tvk}</DisplayString>
  109. </Type>
  110. <Type Name="Closure">
  111. <DisplayString Condition="c.isC">C Function {c.f}</DisplayString>
  112. <DisplayString Condition="!c.isC">Lua Function {l.p->source,na} line {l.p->linedefined}</DisplayString>
  113. <Expand>
  114. <Item Name="C Function" Condition="c.isC">c.f</Item>
  115. <Synthetic Name="Upvalues" Condition="c.isC &amp;&amp; c.nupvalues != 0">
  116. <DisplayString>{(int) c.nupvalues}</DisplayString>
  117. <Expand>
  118. <IndexListItems>
  119. <Size>c.nupvalues</Size>
  120. <ValueNode>c.upvalue[$i]</ValueNode>
  121. </IndexListItems>
  122. </Expand>
  123. </Synthetic>
  124. <Item Name="Lua File" Condition="!l.isC">l.p->source,na</Item>
  125. <Item Name="Line" Condition="!l.isC">l.p->linedefined</Item>
  126. <Synthetic Name="Upvalues" Condition="!l.isC &amp;&amp; l.nupvalues != 0">
  127. <DisplayString>{(int) l.nupvalues}</DisplayString>
  128. <Expand>
  129. <IndexListItems>
  130. <Size>l.nupvalues</Size>
  131. <ValueNode>l.upvals[$i]->v</ValueNode>
  132. </IndexListItems>
  133. </Expand>
  134. </Synthetic>
  135. </Expand>
  136. </Type>
  137. <Type Name="Udata">
  138. <DisplayString>Userdata {uv.len} bytes</DisplayString>
  139. <Expand>
  140. <Item Name="Metatable" Condition="uv.metatable != 0">uv.metatable</Item>
  141. <Item Name="Env" Condition="uv.env != 0">uv.env</Item>
  142. </Expand>
  143. </Type>
  144. </AutoVisualizer>