gmscript.natvis 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
  3. <Type Name="gmMachine">
  4. <DisplayString>{{CurrentMemoryUsage = {m_currentMemoryUsage,d}}}</DisplayString>
  5. <Expand>
  6. <Item Name="CurrentMemoryUsage">m_currentMemoryUsage</Item>
  7. <Item Name="HardMemoryLimit">m_desiredByteMemoryUsageHard</Item>
  8. <Item Name="SoftMemoryLimit">m_desiredByteMemoryUsageSoft</Item>
  9. <Item Name="AutoSizeMemory">m_autoMem</Item>
  10. <Item Name="GC_FullCollects">m_statsGCFullCollect</Item>
  11. <Item Name="GC_IncrementalCollects">m_statsGCIncCollect</Item>
  12. <Item Name="GC_Warnings">m_statsGCWarnings,d</Item>
  13. </Expand>
  14. </Type>
  15. <Type Name="gmThread">
  16. <DisplayString>{{this = ( {m_stack[m_base - 2]} )}}</DisplayString>
  17. <Expand>
  18. <ArrayItems>
  19. <Size>m_numParameters</Size>
  20. <ValuePointer>((gmVariable*)(m_stack+m_base))</ValuePointer>
  21. </ArrayItems>
  22. </Expand>
  23. </Type>
  24. <Type Name="gmVariable">
  25. <DisplayString Condition="m_type == 0">{{null}}</DisplayString>
  26. <DisplayString Condition="m_type == 1">{{int = {m_value.m_int}}}</DisplayString>
  27. <DisplayString Condition="m_type == 2">{{float = {m_value.m_float}}}</DisplayString>
  28. <DisplayString Condition="m_type == 3">{{string = {((gmStringObject *)m_value.m_ref)->m_string,s}}}</DisplayString>
  29. <DisplayString Condition="m_type == 4">{{table[{((gmTableObject*)m_value.m_ref)->m_slotsUsed}]}}</DisplayString>
  30. <DisplayString Condition="(m_type == 5) &amp;&amp; (((gmFunctionObject*)m_value.m_ref)->m_cFunction != 0)">{{function(native) = {((gmFunctionObject*)m_value.m_ref)->m_cFunction}}}</DisplayString>
  31. <DisplayString Condition="(m_type == 5) &amp;&amp; (((gmFunctionObject*)m_value.m_ref)->m_cFunction == 0) &amp;&amp; (((gmFunctionObject*)m_value.m_ref)->m_debugInfo != nullptr)">{{function(script) = {((gmFunctionObject*)m_value.m_ref)->m_debugInfo->m_debugName,s}}}</DisplayString>
  32. <DisplayString Condition="(m_type == 5) &amp;&amp; (((gmFunctionObject*)m_value.m_ref)->m_cFunction == 0) &amp;&amp; (((gmFunctionObject*)m_value.m_ref)->m_debugInfo == nullptr)">{{function = [no debug name, use gmMachine::SetDebugMode(true)]}}}</DisplayString>
  33. <DisplayString Condition="m_type &gt;= 6">{{user = {m_type}}}</DisplayString>
  34. <Expand>
  35. <Item Condition="m_type == 0" Name="null:">"null"</Item>
  36. <Item Condition="m_type == 1" Name="int:">m_value.m_int</Item>
  37. <Item Condition="m_type == 2" Name="float:">m_value.m_float</Item>
  38. <Item Condition="m_type == 3" Name="string:">((gmStringObject*)m_value.m_ref)->m_string,s</Item>
  39. <Item Condition="m_type == 4" Name="table:">((gmTableObject*)m_value.m_ref)</Item>
  40. <Item Condition="m_type == 5" Name="function:">((gmFunctionObject*)m_value.m_ref)</Item>
  41. <Item Condition="m_type &gt;= 6" Name="user:">((gmUserObject*)m_value.m_ref)</Item>
  42. </Expand>
  43. </Type>
  44. <Type Name="gmTableNode">
  45. <DisplayString>{{({m_key} , {m_value})}}</DisplayString>
  46. <Expand>
  47. <Item Name="Key">m_key</Item>
  48. <Item Name="Value">m_value</Item>
  49. </Expand>
  50. </Type>
  51. <Type Name="gmTableObject">
  52. <DisplayString>{{table[{m_slotsUsed}]}}</DisplayString>
  53. <Expand>
  54. <Item Name="Size">m_slotsUsed</Item>
  55. <IndexListItems>
  56. <Size>m_tableSize</Size>
  57. <ValueNode Condition="m_nodes[$i].m_key.m_type != 0">m_nodes[$i]</ValueNode>
  58. <ValueNode Condition="m_nodes[$i].m_key.m_type == 0">"unused slot"</ValueNode> <!-- Want to hide these -->
  59. </IndexListItems>
  60. </Expand>
  61. </Type>
  62. <Type Name="gmStringObject">
  63. <DisplayString>{{string = {m_string}}}</DisplayString>
  64. </Type>
  65. </AutoVisualizer>