Debugger UI skeleton.
This commit is contained in:
15
src/Xenia.Debug/Breakpoint.cs
Normal file
15
src/Xenia.Debug/Breakpoint.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Breakpoint : Changeable {
|
||||
// type code/data/kernel
|
||||
// address+[end address]
|
||||
// conditions? script?
|
||||
// action (suspend, trace, etc)
|
||||
}
|
||||
}
|
||||
21
src/Xenia.Debug/BreakpointList.cs
Normal file
21
src/Xenia.Debug/BreakpointList.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class BreakpointList : Changeable {
|
||||
private readonly List<Breakpoint> breakpoints = new List<Breakpoint>();
|
||||
|
||||
public void Add(Breakpoint breakpoint) {
|
||||
}
|
||||
|
||||
public void Remove(Breakpoint breakpoint) {
|
||||
}
|
||||
|
||||
public void Clear() {
|
||||
}
|
||||
}
|
||||
}
|
||||
10
src/Xenia.Debug/Callstack.cs
Normal file
10
src/Xenia.Debug/Callstack.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Callstack {
|
||||
}
|
||||
}
|
||||
10
src/Xenia.Debug/DebugClient.cs
Normal file
10
src/Xenia.Debug/DebugClient.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class DebugClient {
|
||||
}
|
||||
}
|
||||
53
src/Xenia.Debug/Debugger.cs
Normal file
53
src/Xenia.Debug/Debugger.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Debugger {
|
||||
public DebugClient DebugClient {
|
||||
get;
|
||||
}
|
||||
|
||||
public BreakpointList BreakpointList {
|
||||
get;
|
||||
}
|
||||
public FunctionList FunctionList {
|
||||
get;
|
||||
}
|
||||
public Memory Memory {
|
||||
get;
|
||||
}
|
||||
public ModuleList ModuleList {
|
||||
get;
|
||||
}
|
||||
public ThreadList ThreadList {
|
||||
get;
|
||||
}
|
||||
|
||||
public Debugger() {
|
||||
this.DebugClient = new DebugClient();
|
||||
|
||||
this.BreakpointList = new BreakpointList();
|
||||
this.FunctionList = new FunctionList();
|
||||
this.Memory = new Memory();
|
||||
this.ModuleList = new ModuleList();
|
||||
this.ThreadList = new ThreadList();
|
||||
}
|
||||
|
||||
public bool Open() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public delegate void ChangedEventHandler(EventArgs e);
|
||||
|
||||
public event ChangedEventHandler Changed;
|
||||
|
||||
private void OnChanged(EventArgs e) {
|
||||
if (Changed != null) {
|
||||
Changed(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
src/Xenia.Debug/Function.cs
Normal file
11
src/Xenia.Debug/Function.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Function : Changeable {
|
||||
}
|
||||
}
|
||||
11
src/Xenia.Debug/FunctionList.cs
Normal file
11
src/Xenia.Debug/FunctionList.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class FunctionList : Changeable {
|
||||
}
|
||||
}
|
||||
14
src/Xenia.Debug/Memory.cs
Normal file
14
src/Xenia.Debug/Memory.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Memory : Changeable {
|
||||
public MemoryView CreateView() {
|
||||
return new MemoryView(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
16
src/Xenia.Debug/MemoryView.cs
Normal file
16
src/Xenia.Debug/MemoryView.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class MemoryView : Changeable {
|
||||
private readonly Memory memory;
|
||||
|
||||
public MemoryView(Memory memory) {
|
||||
this.memory = memory;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
src/Xenia.Debug/Module.cs
Normal file
11
src/Xenia.Debug/Module.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class Module : Changeable {
|
||||
}
|
||||
}
|
||||
11
src/Xenia.Debug/ModuleList.cs
Normal file
11
src/Xenia.Debug/ModuleList.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class ModuleList : Changeable {
|
||||
}
|
||||
}
|
||||
14
src/Xenia.Debug/Thread.cs
Normal file
14
src/Xenia.Debug/Thread.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class ThreadContext {
|
||||
}
|
||||
|
||||
public class Thread : Changeable {
|
||||
}
|
||||
}
|
||||
11
src/Xenia.Debug/ThreadList.cs
Normal file
11
src/Xenia.Debug/ThreadList.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xenia.Debug.Utilities;
|
||||
|
||||
namespace Xenia.Debug {
|
||||
public class ThreadList : Changeable {
|
||||
}
|
||||
}
|
||||
31
src/Xenia.Debug/Utilities/Changeable.cs
Normal file
31
src/Xenia.Debug/Utilities/Changeable.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Xenia.Debug.Utilities {
|
||||
public delegate void ChangedEventHandler();
|
||||
|
||||
public class Changeable {
|
||||
private int changeDepth;
|
||||
public event ChangedEventHandler Changed;
|
||||
|
||||
protected void BeginChanging() {
|
||||
++changeDepth;
|
||||
}
|
||||
|
||||
protected void EndChanging() {
|
||||
if (--changeDepth == 0) {
|
||||
OnChanged();
|
||||
}
|
||||
}
|
||||
|
||||
protected void OnChanged() {
|
||||
System.Diagnostics.Debug.Assert(changeDepth == 0);
|
||||
if (Changed != null) {
|
||||
Changed();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,21 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Breakpoint.cs" />
|
||||
<Compile Include="BreakpointList.cs" />
|
||||
<Compile Include="Callstack.cs" />
|
||||
<Compile Include="DebugClient.cs" />
|
||||
<Compile Include="Debugger.cs" />
|
||||
<Compile Include="Function.cs" />
|
||||
<Compile Include="FunctionList.cs" />
|
||||
<Compile Include="Memory.cs" />
|
||||
<Compile Include="MemoryView.cs" />
|
||||
<Compile Include="Module.cs" />
|
||||
<Compile Include="ModuleList.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Thread.cs" />
|
||||
<Compile Include="ThreadList.cs" />
|
||||
<Compile Include="Utilities\Changeable.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
||||
Reference in New Issue
Block a user