Update the .natvis

for nicer display of function names and Aul bytecode.
liquid_container
Nicolas Hake 2016-04-23 17:10:13 +02:00
parent 770be2dafe
commit 8f9cbc88f7
1 changed files with 78 additions and 14 deletions

View File

@ -50,20 +50,21 @@ for the above references.
bccType==AB_PROP_SET ||
bccType==AB_LOCALN ||
bccType==AB_LOCALN_SET ||
bccType==AB_GLOBALN ||
bccType==AB_GLOBALN_SET ||
bccType==AB_CALL ||
bccType==AB_CALLFS
">{bccType,en} {Par.s,na}</DisplayString>
<!-- opcodes with int parameter -->
">{bccType,en} {Par.s,na} [{stack}]</DisplayString>
<DisplayString Condition="
bccType==AB_GLOBALN ||
bccType==AB_GLOBALN_SET
">
{bccType,en} {::ScriptEngine.GlobalNamed.pNames->pNames[Par.i],na} [{stack}]</DisplayString>
<!-- opcodes with int parameter -->
<DisplayString Condition="
bccType==AB_INT ||
bccType==AB_BOOL ||
bccType==AB_DUP ||
bccType==AB_STACK_SET ||
bccType==AB_POP_TO ||
bccType==AB_GLOBALN ||
bccType==AB_GLOBALN_SET ||
bccType==AB_NEW_ARRAY ||
bccType==AB_NEW_PROPLIST ||
bccType==AB_STACK ||
@ -74,20 +75,20 @@ for the above references.
bccType==AB_CONDN ||
bccType==AB_COND ||
bccType==AB_FOREACH_NEXT
">{bccType,en} {Par.i}</DisplayString>
">{bccType,en} {Par.i} [{stack}]</DisplayString>
<!-- opcodes with function parameter -->
<DisplayString Condition="
bccType==AB_CFUNCTION ||
bccType==AB_FUNC
">{bccType,en} {Par.f}</DisplayString>
">{bccType,en} {Par.f,na} [{stack}]</DisplayString>
<!-- opcodes with proplist parameter -->
<DisplayString Condition="
bccType==AB_CPROPLIST
">{bccType,en} {Par.p}</DisplayString>
">{bccType,en} {Par.p} [{stack}]</DisplayString>
<!-- opcodes with array parameter -->
<DisplayString Condition="
bccType==AB_CARRAY
">{bccType,en} {Par.a}</DisplayString>
">{bccType,en} {Par.a} [{stack}]</DisplayString>
<!-- opcodes without parameters -->
<DisplayString Condition="
bccType==AB_NIL ||
@ -97,6 +98,7 @@ for the above references.
bccType==AB_Not ||
bccType==AB_Neg ||
bccType==AB_Inc ||
bccType==AB_Dec ||
bccType==AB_Pow ||
bccType==AB_Div ||
bccType==AB_Mul ||
@ -122,9 +124,56 @@ for the above references.
bccType==AB_PAR ||
bccType==AB_THIS ||
bccType==AB_DEBUG
">{bccType,en}</DisplayString>
">{bccType,en} [{stack}]</DisplayString>
<!-- unknown opcodes -->
<DisplayString>{bccType,en} {Par,na}</DisplayString>
<DisplayString>{bccType,en} {Par,na} [{stack}]</DisplayString>
<!-- Expansions -->
<Expand>
<Item Name="[opcode]">bccType</Item>
<Item Condition="
bccType==AB_STRING ||
bccType==AB_PROP ||
bccType==AB_PROP_SET ||
bccType==AB_LOCALN ||
bccType==AB_LOCALN_SET ||
bccType==AB_CALL ||
bccType==AB_CALLFS"
Name="[par]">Par.s</Item>
<Item Condition="
bccType==AB_INT ||
bccType==AB_BOOL ||
bccType==AB_DUP ||
bccType==AB_STACK_SET ||
bccType==AB_POP_TO ||
bccType==AB_GLOBALN ||
bccType==AB_GLOBALN_SET ||
bccType==AB_NEW_ARRAY ||
bccType==AB_NEW_PROPLIST ||
bccType==AB_STACK ||
bccType==AB_JUMP ||
bccType==AB_JUMPAND ||
bccType==AB_JUMPOR ||
bccType==AB_JUMPNNIL ||
bccType==AB_CONDN ||
bccType==AB_COND ||
bccType==AB_FOREACH_NEXT
" Name="[par]">Par.i</Item>
<Item Condition="
bccType==AB_JUMP ||
bccType==AB_JUMPAND ||
bccType==AB_JUMPOR ||
bccType==AB_JUMPNNIL ||
bccType==AB_CONDN ||
bccType==AB_COND
" Name="[jump]">this[Par.i]</Item>
<Synthetic Name="[code]" Optional="true">
<DisplayString>{code,na}</DisplayString>
</Synthetic>
</Expand>
</Type>
<Type Name="C4Value">
@ -166,7 +215,7 @@ for the above references.
<Variable Name="slot" InitialValue="0"/>
<Size>Size</Size>
<Loop>
<If Condition="Table[slot].Key != nullptr">
<If Condition="Table[slot].Key != 0">
<Item Name="[{slot}]">Table[slot]</Item>
</If>
<Exec>++slot</Exec>
@ -177,7 +226,9 @@ for the above references.
</Type>
<Type Name="C4AulScriptFunc">
<DisplayString>{*Parent,view(name)}::{Name,sb}</DisplayString>
<DisplayString Condition="((C4DefScriptHost*)pOrgScript)->Def == Parent">{*Parent,view(name)}::{Name,sb}</DisplayString>
<DisplayString Condition="&amp;ScriptEngine == Parent">Global::{Name,sb}</DisplayString>
<DisplayString>{*Parent,view(name)}-&gt;{*pOrgScript,view(name)}::{Name,sb}</DisplayString>
<Expand>
<Synthetic Name="[parameters]">
<!--<DisplayString>{ParType,[ParCount]}</DisplayString>-->
@ -191,10 +242,23 @@ for the above references.
</Expand>
</Type>
<Type Name="C4AulScriptEngine">
<DisplayString IncludeView="name">Global</DisplayString>
<DisplayString>ScriptEngine</DisplayString>
</Type>
<Type Name="C4AulFunc">
<DisplayString>{Name,sb}</DisplayString>
</Type>
<Type Name="C4DefScriptHost">
<DisplayString IncludeView="name">{*Def,view(name)}</DisplayString>
<DisplayString>{*Def}</DisplayString>
</Type>
<Type Name="C4ExtraScriptHost">
<DisplayString IncludeView="name">{{{ComponentHost.Filename,sb}}}</DisplayString>
<DisplayString>{ScriptName}</DisplayString>
</Type>
<Type Name="C4GameScriptHost">
<DisplayString IncludeView="name">{{scenario}}</DisplayString>
<DisplayString>{ScriptName}</DisplayString>