From 4ae16c27e2db2002fa4550c762ea405bff492a03 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Wed, 23 Oct 2019 10:39:23 +0300 Subject: [PATCH] - added Visual Studio debugger visualization for several types --- src/CMakeLists.txt | 1 + src/utility/tarray.h | 2 + src/win32/zdoom.natvis | 83 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 src/win32/zdoom.natvis diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 182eced71..6f6ece0a2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -743,6 +743,7 @@ set( NOT_COMPILED_SOURCE_FILES scripting/zscript/zcc-parse.lemon zcc-parse.c zcc-parse.h + win32/zdoom.natvis ) set( VM_JIT_SOURCES diff --git a/src/utility/tarray.h b/src/utility/tarray.h index ac84da6c7..ca4d86bc7 100644 --- a/src/utility/tarray.h +++ b/src/utility/tarray.h @@ -619,6 +619,7 @@ public: typedef TIterator iterator; typedef TIterator const_iterator; + typedef T value_type; iterator begin() { @@ -1478,6 +1479,7 @@ public: typedef TIterator iterator; typedef TIterator const_iterator; + typedef T value_type; iterator begin() { diff --git a/src/win32/zdoom.natvis b/src/win32/zdoom.natvis new file mode 100644 index 000000000..d22342cc0 --- /dev/null +++ b/src/win32/zdoom.natvis @@ -0,0 +1,83 @@ + + + + + + Size = {Count} + + Count + Most + + Count + (value_type*)Array + + + + + + Size = {Count} + + Count + + Count + (value_type*)Array + + + + + + Size = {Count} + + Count + + Count + (value_type*)Array + + + + + + {FName::NameData.NameArray[Index].Text, s} + + + + {Chars, s} + + ((FStringData*)Chars - 1)->Len + ((FStringData*)Chars - 1)->AllocLen + ((FStringData*)Chars - 1)->RefCount + + + + + {Degrees} + + + + {TypeName} + + + + {Class->TypeName} + + + + <NULL> + {o->Class->TypeName} + + + + <None> + {TexMan.Textures[texnum].Texture->Name} + + texnum + TexMan.Textures[texnum].Texture + + + + + <None> + {S_sfx[ID].name} + + +