diff --git a/FuzzyRangeComparer.cs b/FuzzyRangeComparer.cs index dc47335..7068a24 100644 --- a/FuzzyRangeComparer.cs +++ b/FuzzyRangeComparer.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace PmipMyCallStack +namespace UnityMixedCallstack { struct Range { diff --git a/Images/cs.png b/Images/cs.png index f851a08..50be046 100644 Binary files a/Images/cs.png and b/Images/cs.png differ diff --git a/README.md b/README.md index c24c7c9..8b7696e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Pmip My Call Stack ===== -PmipMyCallStack is a Visual Studio 2015 extension to help debug native applications embedding Mono, like Unity. +UnityMixedCallstack is a Visual Studio 2015 extension to help debug native applications embedding Mono, like Unity. Mono doesn't generate debug symbols that Visual Studio understands for jitted functions. @@ -9,17 +9,17 @@ As a result, Visual Studio can not show anything meaningful for managed stack fr This fork of PmipMyCallstack has been developed for developers at unity-technologies and support has been added to our clone of mono, which can be found here https://github.com/Unity-Technologies/mono -This version requires you to set the MONO_PMIP environment variable before launching Unity or using our mono, which will tell the mono runtime to write out each jit'd function to a file. +This version requires you to set the UNITY_MIXED_CALLSTACK environment variable before launching visual studio and before launching Unity (or using our mono standalone), which will tell the mono runtime to write out each jit'd function to a file. -The original PmipMyCallstack would call the function `mono_pmip` on every frame that doesn't belong to a module to show a meaningful representation of the stack frame and display it natively in the call stack window. This version of PmipMyCallstack does the same thing, but instead of calling over inter process communication, mono writes a file with the jit information and we lookup the IP from that. This allows us to open much larger callstacks, and many frames without visual studio hanging. +The original PmipMyCallstack plugin created by JB Evain would call the function `mono_pmip` on every frame that doesn't belong to a module to show a meaningful representation of the stack frame and display it natively in the call stack window. This plugin does the same thing, but instead of calling over ipc, mono writes a file with the jit information and we lookup the IP from that. This allows us to open much larger callstacks, and many frames without visual studio hanging for a long time (an issue since Unity has so many threads). -In this version we also display the module the managed code belongs to, and the file and linenumber information if mono has loaded debug symbols. This gives you a nice callstack to look at in visual studio. +In this version we also display the module the managed code belongs to. This gives you a nice callstack to look at in visual studio. ## Before -![Before Pmip My Call Stack](https://raw.githubusercontent.com/mderoy/PmipMyCallStack/master/Images/csb.png) +![Before Unity Mixed Callstack](https://raw.githubusercontent.com/mderoy/PmipMyCallStack/master/Images/csb.png) ## After -![After Pmip My Call Stack](https://raw.githubusercontent.com/mderoy/PmipMyCallStack/master/Images/cs.png) +![After Unity Mixed Callstack](https://raw.githubusercontent.com/mderoy/PmipMyCallStack/master/Images/cs.png) diff --git a/PmipMyCallStack.csproj b/UnityMixedCallstack.csproj similarity index 93% rename from PmipMyCallStack.csproj rename to UnityMixedCallstack.csproj index ae4fc74..bb82a79 100644 --- a/PmipMyCallStack.csproj +++ b/UnityMixedCallstack.csproj @@ -14,8 +14,8 @@ {9A899D87-5BFA-4886-B701-68C515F1371C} Library Properties - PmipMyCallStack - PmipMyCallStack + UnityMixedCallStack + UnityMixedCallStack v4.5 512 false @@ -61,11 +61,11 @@ - + - + @@ -76,7 +76,7 @@ - $(OutputPath)\PmipMyCallStack.vsdconfig + $(OutputPath)\UnityMixedCallStack.vsdconfig diff --git a/PmipMyCallStack.sln b/UnityMixedCallstack.sln similarity index 85% rename from PmipMyCallStack.sln rename to UnityMixedCallstack.sln index 8a2591c..116c5e7 100644 --- a/PmipMyCallStack.sln +++ b/UnityMixedCallstack.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PmipMyCallStack", "PmipMyCallStack.csproj", "{9A899D87-5BFA-4886-B701-68C515F1371C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnityMixedCallStack", "UnityMixedCallStack.csproj", "{9A899D87-5BFA-4886-B701-68C515F1371C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/PmipMyCallStack.vsdconfigxml b/UnityMixedCallstack.vsdconfigxml similarity index 82% rename from PmipMyCallStack.vsdconfigxml rename to UnityMixedCallstack.vsdconfigxml index 47565fe..1ed155e 100644 --- a/PmipMyCallStack.vsdconfigxml +++ b/UnityMixedCallstack.vsdconfigxml @@ -3,9 +3,9 @@ + AssemblyName="UnityMixedCallstack"> - + diff --git a/PmipCallStackFilter.cs b/UnityMixedCallstackFilter.cs similarity index 95% rename from PmipCallStackFilter.cs rename to UnityMixedCallstackFilter.cs index 063c25a..2ee0a63 100644 --- a/PmipCallStackFilter.cs +++ b/UnityMixedCallstackFilter.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.IO; using Microsoft.VisualStudio; @@ -10,9 +9,9 @@ using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; -namespace PmipMyCallStack +namespace UnityMixedCallstack { - public class PmipCallStackFilter : IDkmCallStackFilter, IDkmLoadCompleteNotification + public class UnityMixedCallstackFilter : IDkmCallStackFilter, IDkmLoadCompleteNotification { private static List _rangesSortedByIp = new List(); private static FuzzyRangeComparer _comparer = new FuzzyRangeComparer(); @@ -54,10 +53,10 @@ public DkmStackWalkFrame[] FilterNextFrame(DkmStackContext stackContext, DkmStac if (!_enabled) // environment variable not set return new[] { input }; - return new[] { PmipStackFrame(stackContext, input) }; + return new[] { UnityMixedStackFrame(stackContext, input) }; } - private static DkmStackWalkFrame PmipStackFrame(DkmStackContext stackContext, DkmStackWalkFrame frame) + private static DkmStackWalkFrame UnityMixedStackFrame(DkmStackContext stackContext, DkmStackWalkFrame frame) { RefreshStackData(frame.Process.LivePart.Id); string name = null; diff --git a/source.extension.vsixmanifest b/source.extension.vsixmanifest index 6def470..c9a0923 100644 --- a/source.extension.vsixmanifest +++ b/source.extension.vsixmanifest @@ -1,8 +1,8 @@  - - Unity Pmip My Call Stack + + Unity Mixed Callstack Visual Studio native debugger extension to help debug native applications using Mono. Originally developed by Jb Evain, Updated for Unity by Michael DeRoy and Jonathan Chambers @@ -12,6 +12,6 @@ - + \ No newline at end of file