Browse Source

Adjust debugger test cases to new DefaultResolvedMethod.ToString() implementation.

Enable lazy-loading for the debugger type system.
newNRvisualizers
Daniel Grunwald 14 years ago
parent
commit
dfaab95005
  1. 1
      src/AddIns/Debugger/Debugger.Core/TypeSystemExtensions.cs
  2. 12
      src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_MainThreadExit.cs
  3. 12
      src/AddIns/Debugger/Debugger.Tests/Tests/StackFrame_Callstack.cs
  4. 16
      src/AddIns/Debugger/Debugger.Tests/Tests/StackFrame_Lifetime.cs
  5. 12
      src/AddIns/Debugger/Debugger.Tests/Tests/Thread_Tests.cs

1
src/AddIns/Debugger/Debugger.Core/TypeSystemExtensions.cs

@ -61,6 +61,7 @@ namespace Debugger @@ -61,6 +61,7 @@ namespace Debugger
{
CecilLoader loader = new CecilLoader(true);
loader.IncludeInternalMembers = true;
loader.LazyLoad = true;
var asm = loader.LoadAssemblyFile(name);
var moduleMetadataInfo = new ModuleMetadataInfo(module);
foreach (var typeDef in asm.GetAllTypeDefinitions()) {

12
src/AddIns/Debugger/Debugger.Tests/Tests/ControlFlow_MainThreadExit.cs

@ -62,20 +62,20 @@ namespace Debugger.Tests { @@ -62,20 +62,20 @@ namespace Debugger.Tests {
Count="2">
<Item>
<Thread
Callstack="{[Method Debugger.Tests.ControlFlow_MainThreadExit.Main]}"
Callstack="{[Method Debugger.Tests.ControlFlow_MainThreadExit.Main():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method Debugger.Tests.ControlFlow_MainThreadExit.Main]"
MostRecentStackFrame="[Method Debugger.Tests.ControlFlow_MainThreadExit.Main():System.Void]"
Name=""
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />
</Item>
<Item>
<Thread
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime], [Method System.Threading.ThreadHelper.ThreadStart_Context], [Method System.Threading.ExecutionContext.RunInternal], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ThreadHelper.ThreadStart]}"
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne(waitableSafeHandle:System.Runtime.InteropServices.SafeHandle, millisecondsTimeout:System.Int64, hasThreadAffinity:System.Boolean, exitContext:System.Boolean):System.Boolean], [Method System.Threading.WaitHandle.WaitOne(millisecondsTimeout:System.Int32, exitContext:System.Boolean):System.Boolean], [Method System.Threading.WaitHandle.WaitOne():System.Boolean], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime():System.Void], [Method System.Threading.ThreadHelper.ThreadStart_Context(state:System.Object):System.Void], [Method System.Threading.ExecutionContext.RunInternal(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object, preserveSyncCtx:System.Boolean):System.Void], [Method System.Threading.ExecutionContext.Run(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object, preserveSyncCtx:System.Boolean):System.Void], [Method System.Threading.ExecutionContext.Run(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object):System.Void], [Method System.Threading.ThreadHelper.ThreadStart():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne]"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne(waitableSafeHandle:System.Runtime.InteropServices.SafeHandle, millisecondsTimeout:System.Int64, hasThreadAffinity:System.Boolean, exitContext:System.Boolean):System.Boolean]"
Name="Worker thread"
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />
@ -93,10 +93,10 @@ namespace Debugger.Tests { @@ -93,10 +93,10 @@ namespace Debugger.Tests {
</Item>
<Item>
<Thread
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method System.Threading.WaitHandle.WaitOne], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime], [Method System.Threading.ThreadHelper.ThreadStart_Context], [Method System.Threading.ExecutionContext.RunInternal], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ExecutionContext.Run], [Method System.Threading.ThreadHelper.ThreadStart]}"
Callstack="{[Method System.Threading.WaitHandle.InternalWaitOne(waitableSafeHandle:System.Runtime.InteropServices.SafeHandle, millisecondsTimeout:System.Int64, hasThreadAffinity:System.Boolean, exitContext:System.Boolean):System.Boolean], [Method System.Threading.WaitHandle.WaitOne(millisecondsTimeout:System.Int32, exitContext:System.Boolean):System.Boolean], [Method System.Threading.WaitHandle.WaitOne():System.Boolean], [Method Debugger.Tests.ControlFlow_MainThreadExit.WaitForALongTime():System.Void], [Method System.Threading.ThreadHelper.ThreadStart_Context(state:System.Object):System.Void], [Method System.Threading.ExecutionContext.RunInternal(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object, preserveSyncCtx:System.Boolean):System.Void], [Method System.Threading.ExecutionContext.Run(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object, preserveSyncCtx:System.Boolean):System.Void], [Method System.Threading.ExecutionContext.Run(executionContext:System.Threading.ExecutionContext, callback:System.Threading.ContextCallback, state:System.Object):System.Void], [Method System.Threading.ThreadHelper.ThreadStart():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne]"
MostRecentStackFrame="[Method System.Threading.WaitHandle.InternalWaitOne(waitableSafeHandle:System.Runtime.InteropServices.SafeHandle, millisecondsTimeout:System.Int64, hasThreadAffinity:System.Boolean, exitContext:System.Boolean):System.Boolean]"
Name="Worker thread"
Priority="Normal"
RuntimeValue="{System.Threading.Thread}" />

12
src/AddIns/Debugger/Debugger.Tests/Tests/StackFrame_Callstack.cs

@ -60,7 +60,7 @@ namespace Debugger.Tests { @@ -60,7 +60,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="2"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub2]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub2():System.Void]"
NextStatement="StackFrame_Callstack.cs:22,4-22,40"
Thread="Thread Name = Suspended = False" />
</Item>
@ -69,7 +69,7 @@ namespace Debugger.Tests { @@ -69,7 +69,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub1]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub1():System.Void]"
NextStatement="StackFrame_Callstack.cs:17,4-17,11"
Thread="Thread Name = Suspended = False" />
</Item>
@ -77,7 +77,7 @@ namespace Debugger.Tests { @@ -77,7 +77,7 @@ namespace Debugger.Tests {
<StackFrame
ChainIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main():System.Void]"
NextStatement="StackFrame_Callstack.cs:12,4-12,11"
Thread="Thread Name = Suspended = False" />
</Item>
@ -89,7 +89,7 @@ namespace Debugger.Tests { @@ -89,7 +89,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub1]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Sub1():System.Void]"
NextStatement="StackFrame_Callstack.cs:17,4-17,11"
Thread="Thread Name = Suspended = False" />
</Item>
@ -97,7 +97,7 @@ namespace Debugger.Tests { @@ -97,7 +97,7 @@ namespace Debugger.Tests {
<StackFrame
ChainIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main():System.Void]"
NextStatement="StackFrame_Callstack.cs:12,4-12,11"
Thread="Thread Name = Suspended = False" />
</Item>
@ -108,7 +108,7 @@ namespace Debugger.Tests { @@ -108,7 +108,7 @@ namespace Debugger.Tests {
<StackFrame
ChainIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main]"
MethodInfo="[Method Debugger.Tests.StackFrame_Callstack.Main():System.Void]"
NextStatement="StackFrame_Callstack.cs:12,4-12,11"
Thread="Thread Name = Suspended = False" />
</Item>

16
src/AddIns/Debugger/Debugger.Tests/Tests/StackFrame_Lifetime.cs

@ -73,7 +73,7 @@ namespace Debugger.Tests { @@ -73,7 +73,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function(i:System.Int32):System.Void]"
NextStatement="StackFrame_Lifetime.cs:18,4-18,40"
Thread="Thread Name = Suspended = False" />
</SelectedStackFrame>
@ -84,7 +84,7 @@ namespace Debugger.Tests { @@ -84,7 +84,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function(i:System.Int32):System.Void]"
NextStatement="StackFrame_Lifetime.cs:19,4-19,18"
Thread="Thread Name = Suspended = False" />
</Old_StackFrame>
@ -93,7 +93,7 @@ namespace Debugger.Tests { @@ -93,7 +93,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="2"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.SubFunction]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.SubFunction():System.Void]"
NextStatement="StackFrame_Lifetime.cs:25,4-25,40"
Thread="Thread Name = Suspended = False" />
</SelectedStackFrame>
@ -104,7 +104,7 @@ namespace Debugger.Tests { @@ -104,7 +104,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function(i:System.Int32):System.Void]"
NextStatement="StackFrame_Lifetime.cs:20,4-20,40"
Thread="Thread Name = Suspended = False" />
</Old_StackFrame>
@ -114,7 +114,7 @@ namespace Debugger.Tests { @@ -114,7 +114,7 @@ namespace Debugger.Tests {
ChainIndex="1"
FrameIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function(i:System.Int32):System.Void]"
NextStatement="StackFrame_Lifetime.cs:20,4-20,40"
Thread="Thread Name = Suspended = False" />
</SelectedStackFrame>
@ -123,7 +123,7 @@ namespace Debugger.Tests { @@ -123,7 +123,7 @@ namespace Debugger.Tests {
<StackFrame
ChainIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Main]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Main():System.Void]"
NextStatement="StackFrame_Lifetime.cs:13,4-13,40"
Thread="Thread Name = Suspended = False" />
</Main>
@ -134,7 +134,7 @@ namespace Debugger.Tests { @@ -134,7 +134,7 @@ namespace Debugger.Tests {
FrameIndex="1"
HasSymbols="True"
IsInvalid="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Function(i:System.Int32):System.Void]"
NextStatement="{Exception: The requested frame index is too big}"
Thread="Thread Name = Suspended = False" />
</Old_StackFrame>
@ -142,7 +142,7 @@ namespace Debugger.Tests { @@ -142,7 +142,7 @@ namespace Debugger.Tests {
<StackFrame
ChainIndex="1"
HasSymbols="True"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Main]"
MethodInfo="[Method Debugger.Tests.StackFrame_Lifetime.Main():System.Void]"
NextStatement="StackFrame_Lifetime.cs:13,4-13,40"
Thread="Thread Name = Suspended = False" />
</SelectedStackFrame>

12
src/AddIns/Debugger/Debugger.Tests/Tests/Thread_Tests.cs

@ -49,10 +49,10 @@ namespace Debugger.Tests { @@ -49,10 +49,10 @@ namespace Debugger.Tests {
<Paused>Thread_Tests.cs:12,4-12,40</Paused>
<Thread>
<Thread
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main():System.Void]"
Name=""
Priority="Normal"
RuntimeValue="null" />
@ -60,10 +60,10 @@ namespace Debugger.Tests { @@ -60,10 +60,10 @@ namespace Debugger.Tests {
<Paused>Thread_Tests.cs:15,4-15,40</Paused>
<Thread>
<Thread
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main():System.Void]"
Name=""
Priority="AboveNormal"
RuntimeValue="{System.Threading.Thread}" />
@ -71,10 +71,10 @@ namespace Debugger.Tests { @@ -71,10 +71,10 @@ namespace Debugger.Tests {
<Paused>Thread_Tests.cs:17,4-17,40</Paused>
<Thread>
<Thread
Callstack="{[Method Debugger.Tests.Thread_Tests.Main]}"
Callstack="{[Method Debugger.Tests.Thread_Tests.Main():System.Void]}"
IsAtSafePoint="True"
IsInValidState="True"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main]"
MostRecentStackFrame="[Method Debugger.Tests.Thread_Tests.Main():System.Void]"
Name="ThreadName"
Priority="AboveNormal"
RuntimeValue="{System.Threading.Thread}" />

Loading…
Cancel
Save