[pspplayer commit] r594 - in trunk/Noxa.Emulation.Psp.Player: . Debugger/Tools Properties Web References

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 29, 2008, 11:14:41 AM3/29/08
to psppla...@googlegroups.com
Author: ben.vanik
Date: Sat Mar 29 08:14:14 2008
New Revision: 594

Removed:
trunk/Noxa.Emulation.Psp.Player/Web References/
Modified:
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeTool.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeViewControl.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.cs
trunk/Noxa.Emulation.Psp.Player/Noxa.Emulation.Psp.Player.csproj
trunk/Noxa.Emulation.Psp.Player/Properties/Settings.Designer.cs
trunk/Noxa.Emulation.Psp.Player/Properties/Settings.settings
trunk/Noxa.Emulation.Psp.Player/app.config

Log:
added double click navigation to debugger (dblclick to label/method and memory) - full navigation not done yet, but close. removed obsolete service stuff.

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeTool.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeTool.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeTool.cs Sat Mar 29 08:14:14 2008
@@ -58,7 +58,7 @@
public void SetAddress( uint address, bool isCurrentStatement )
{
this.codeView.Enabled = true;
- this.codeView.SetAddress( address );
+ this.codeView.NavigateToAddress( address );
this.codeView.Focus();
this.registersControl.Enabled = true;
this.registersControl.Invalidate();

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeViewControl.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeViewControl.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeViewControl.cs Sat Mar 29 08:14:14 2008
@@ -152,6 +152,58 @@
{
base.OnMouseDown( e );
this.Focus();
+
+ if( e.Clicks == 2 )
+ {
+ if( e.X < 2 + _gutterWidth + 1 + _addressWidth + 1 )
+ return;
+
+ int y = e.Y / _lineHeight;
+ int lineIndex = Math.Min( _firstVisibleLine + y, _totalLines );
+ int currentLine = lineIndex;
+ int lineSum;
+ int index = this.IndexOfMethodAt( currentLine, out lineSum );
+ if( index == -1 )
+ return;
+ int lineOffset = currentLine - lineSum;
+ if( currentLine <= _lastVisibleLine )
+ {
+ if( index < _codeCache.Methods.Count )
+ {
+ MethodBody body = _codeCache.Methods[ index++ ];
+ List<Line> lines = ( List<Line> )body.UserCache;
+ if( lines == null )
+ lines = this.CacheMethod( body );
+
+ Line line = lines[ lineOffset ];
+ switch( line.Type )
+ {
+ case LineType.Label:
+ Debug.WriteLine( line.Instruction.Label.ToString() );
+ break;
+ case LineType.Instruction:
+ Debug.WriteLine( line.Instruction.ToString() );
+ if( line.Instruction.Reference is CodeReference )
+ {
+ uint target = line.Instruction.Reference.Address;
+ this.NavigateToAddress( target );
+ }
+ else if( line.Instruction.Reference is Noxa.Emulation.Psp.Player.Debugger.Model.Label )
+ {
+ uint target = line.Instruction.Reference.Address;
+ this.NavigateToAddress( target );
+ }
+ else if( line.Instruction.Reference is MemoryReference )
+ {
+ uint target = line.Instruction.Reference.Address;
+ _debugger.MemoryTool.NavigateToAddress( target );
+ _debugger.MemoryTool.Activate();
+ }
+ break;
+ }
+ }
+ }
+ }
}

protected override void OnMouseMove( MouseEventArgs e )
@@ -238,6 +290,62 @@
#region Scrolling/navigation

private int _scrollLine;
+ private List<uint> _navigationStack = new List<uint>();
+ private int _navigationIndex;
+
+ public void ClearNavigation()
+ {
+ uint head = _navigationStack[ _navigationStack.Count - 1 ];
+ _navigationStack.Clear();
+ _navigationStack.Add( head );
+ _navigationIndex = 0;
+ }
+
+ private uint PeekNavigationStack()
+ {
+ if( _navigationStack.Count == 0 )
+ return 0;
+ return _navigationStack[ _navigationIndex ];
+ }
+
+ public void NavigateBack()
+ {
+ if( _navigationIndex <= 0 )
+ return;
+ _navigationIndex--;
+ this.SetAddress( _navigationStack[ _navigationIndex ] );
+ }
+
+ public void NavigateForward()
+ {
+ if( _navigationIndex >= _navigationStack.Count - 1 )
+ return;
+ _navigationIndex++;
+ uint next = this.PeekNavigationStack();
+ this.SetAddress( next );
+ }
+
+ public void NavigateToAddress( uint address )
+ {
+ if( _navigationStack.Count == 0 )
+ {
+ _navigationStack.Add( address );
+ _navigationIndex = 0;
+ }
+ else
+ {
+ uint current = this.PeekNavigationStack();
+ if( current == address )
+ {
+ this.SetAddress( address );
+ return;
+ }
+ _navigationStack.RemoveRange( _navigationIndex + 1, _navigationStack.Count - _navigationIndex - 1 );
+ _navigationStack.Add( address );
+ _navigationIndex++;
+ }
+ this.SetAddress( address );
+ }

public void SetAddress( uint address )
{
@@ -947,7 +1055,7 @@
if( instr == null )
return;

- this.SetAddress( _debugger.PC );
+ this.NavigateToAddress( _debugger.PC );
this.Focus();

this.ContextReturn();

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.cs Sat Mar 29 08:14:14 2008
@@ -57,5 +57,69 @@
break;
}
}
+
+ private List<uint> _navigationStack = new List<uint>();
+ private int _navigationIndex;
+
+ public void ClearNavigation()
+ {
+ uint head = _navigationStack[ _navigationStack.Count - 1 ];
+ _navigationStack.Clear();
+ _navigationStack.Add( head );
+ _navigationIndex = 0;
+ }
+
+ private uint PeekNavigationStack()
+ {
+ if( _navigationStack.Count == 0 )
+ return 0;
+ return _navigationStack[ _navigationIndex ];
+ }
+
+ public void NavigateBack()
+ {
+ if( _navigationIndex <= 0 )
+ return;
+ _navigationIndex--;
+ this.SetAddress( _navigationStack[ _navigationIndex ] );
+ }
+
+ public void NavigateForward()
+ {
+ if( _navigationIndex >= _navigationStack.Count - 1 )
+ return;
+ _navigationIndex++;
+ uint next = this.PeekNavigationStack();
+ this.SetAddress( next );
+ }
+
+ public void NavigateToAddress( uint address )
+ {
+ if( _navigationStack.Count == 0 )
+ {
+ _navigationStack.Add( address );
+ _navigationIndex = 0;
+ }
+ else
+ {
+ uint current = this.PeekNavigationStack();
+ if( current == address )
+ {
+ this.SetAddress( address );
+ return;
+ }
+ _navigationStack.RemoveRange( _navigationIndex + 1, _navigationStack.Count - _navigationIndex - 1 );
+ _navigationStack.Add( address );
+ _navigationIndex++;
+ }
+ this.SetAddress( address );
+ }
+
+ private void SetAddress( uint address )
+ {
+ long translated = address - hexBox.ByteProvider.Offset;
+ hexBox.ScrollByteIntoView( translated );
+ hexBox.Select( translated, 4 );
+ }
}
}

Modified: trunk/Noxa.Emulation.Psp.Player/Noxa.Emulation.Psp.Player.csproj
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Noxa.Emulation.Psp.Player.csproj (original)
+++ trunk/Noxa.Emulation.Psp.Player/Noxa.Emulation.Psp.Player.csproj Sat Mar 29 08:14:14 2008
@@ -46,6 +46,10 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Newtonsoft.Json, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\Dependencies\Newtonsoft.Json.dll</HintPath>
+ </Reference>
<Reference Include="Puzzle.CoreLib.NET2, Version=1.0.6.14896, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dependencies\Puzzle.CoreLib.NET2.dll</HintPath>
@@ -331,18 +335,6 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
- <EmbeddedResource Include="ServiceTools\CheckCompatability.resx">
- <SubType>Designer</SubType>
- <DependentUpon>CheckCompatability.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="ServiceTools\PleaseWaitDialog.resx">
- <SubType>Designer</SubType>
- <DependentUpon>PleaseWaitDialog.cs</DependentUpon>
- </EmbeddedResource>
- <EmbeddedResource Include="ServiceTools\SubmitGame.resx">
- <SubType>Designer</SubType>
- <DependentUpon>SubmitGame.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="Strings.resx">
<SubType>Designer</SubType>
<Generator>ResXFileCodeGenerator</Generator>
@@ -370,41 +362,11 @@
<Compile Include="RenderControl.Designer.cs">
<DependentUpon>RenderControl.cs</DependentUpon>
</Compile>
- <Compile Include="ServiceTools\CheckCompatability.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="ServiceTools\CheckCompatability.Designer.cs">
- <DependentUpon>CheckCompatability.cs</DependentUpon>
- </Compile>
- <Compile Include="ServiceTools\PleaseWaitDialog.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="ServiceTools\PleaseWaitDialog.Designer.cs">
- <DependentUpon>PleaseWaitDialog.cs</DependentUpon>
- </Compile>
- <Compile Include="ServiceTools\ServiceUtilities.cs" />
- <Compile Include="ServiceTools\SubmitGame.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="ServiceTools\SubmitGame.Designer.cs">
- <DependentUpon>SubmitGame.cs</DependentUpon>
- </Compile>
- <Compile Include="ServiceTools\SubmitReport.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="ServiceTools\SubmitReport.Designer.cs">
- <DependentUpon>SubmitReport.cs</DependentUpon>
- </Compile>
<Compile Include="Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Strings.resx</DependentUpon>
</Compile>
- <Compile Include="Web References\CompatibilityService\Reference.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>Reference.map</DependentUpon>
- </Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dependencies\Be.Windows.Forms.HexBox\Be.Windows.Forms.HexBox.csproj">
@@ -498,38 +460,7 @@
<None Include="Resources\ToggleBreakpointIcon.png" />
<Content Include="Resources\UmdIcon.png" />
<None Include="Resources\WatchesIcon.png" />
- <None Include="Web References\CompatibilityService\AddResult1.datasource">
- <DependentUpon>Reference.map</DependentUpon>
- </None>
- <None Include="Web References\CompatibilityService\CompatibilityResults.datasource">
- <DependentUpon>Reference.map</DependentUpon>
- </None>
- <None Include="Web References\CompatibilityService\Game.datasource">
- <DependentUpon>Reference.map</DependentUpon>
- </None>
- <None Include="Web References\CompatibilityService\Reference.map">
- <Generator>MSDiscoCodeGenerator</Generator>
- <LastGenOutput>Reference.cs</LastGenOutput>
- </None>
- <None Include="Web References\CompatibilityService\Service.disco" />
<None Include="Resources\WarningIcon.png" />
- <None Include="Web References\CompatibilityService\Service.wsdl" />
- </ItemGroup>
- <ItemGroup>
- <WebReferences Include="Web References\" />
- </ItemGroup>
- <ItemGroup>
- <WebReferenceUrl Include="http://localhost:8080/PSPCompat/Service.asmx">
- <UrlBehavior>Dynamic</UrlBehavior>
- <RelPath>Web References\CompatibilityService\</RelPath>
- <UpdateFromURL>http://localhost:8080/PSPCompat/Service.asmx</UpdateFromURL>
- <ServiceLocationURL>
- </ServiceLocationURL>
- <CachedDynamicPropName>
- </CachedDynamicPropName>
- <CachedAppSettingsObjectName>Settings</CachedAppSettingsObjectName>
- <CachedSettingsPropName>Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatabilityService_Service</CachedSettingsPropName>
- </WebReferenceUrl>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

Modified: trunk/Noxa.Emulation.Psp.Player/Properties/Settings.Designer.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Properties/Settings.Designer.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Properties/Settings.Designer.cs Sat Mar 29 08:14:14 2008
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.1378
+// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@@ -79,26 +79,6 @@
}
set {
this["ShowReportOnWarnings"] = value;
- }
- }
-
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
- [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:8080/PSPCompat/Service.asmx")]
- public string Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatibilityService_Service {
- get {
- return ((string)(this["Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatibilityService_Service"]));
- }
- }
-
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)]
- [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:8080/PSPCompat/Service.asmx")]
- public string Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatabilityService_Service {
- get {
- return ((string)(this["Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatabilityService_Service"]));
}
}
}

Modified: trunk/Noxa.Emulation.Psp.Player/Properties/Settings.settings
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Properties/Settings.settings (original)
+++ trunk/Noxa.Emulation.Psp.Player/Properties/Settings.settings Sat Mar 29 08:14:14 2008
@@ -17,11 +17,5 @@
<Setting Name="ShowReportOnWarnings" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
- <Setting Name="Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatibilityService_Service" Type="(Web Service URL)" Scope="Application">
- <Value Profile="(Default)">http://localhost:8080/PSPCompat/Service.asmx</Value>
- </Setting>
- <Setting Name="Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatabilityService_Service" Type="(Web Service URL)" Scope="Application">
- <Value Profile="(Default)">http://localhost:8080/PSPCompat/Service.asmx</Value>
- </Setting>
</Settings>
</SettingsFile>

Modified: trunk/Noxa.Emulation.Psp.Player/app.config
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/app.config (original)
+++ trunk/Noxa.Emulation.Psp.Player/app.config Sat Mar 29 08:14:14 2008
@@ -4,9 +4,6 @@
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Noxa.Emulation.Psp.Player.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
- <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
- <section name="Noxa.Emulation.Psp.Player.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
- </sectionGroup>
</configSections>
<userSettings>
<Noxa.Emulation.Psp.Player.Properties.Settings>
@@ -24,16 +21,4 @@
</setting>
</Noxa.Emulation.Psp.Player.Properties.Settings>
</userSettings>
- <applicationSettings>
- <Noxa.Emulation.Psp.Player.Properties.Settings>
- <setting name="Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatibilityService_Service"
- serializeAs="String">
- <value>http://localhost:8080/PSPCompat/Service.asmx</value>
- </setting>
- <setting name="Noxa_Emulation_Psp_Player_Noxa_Emulation_Psp_CompatabilityService_Service"
- serializeAs="String">
- <value>http://localhost:8080/PSPCompat/Service.asmx</value>
- </setting>
- </Noxa.Emulation.Psp.Player.Properties.Settings>
- </applicationSettings>
</configuration>

Reply all
Reply to author
Forward
0 new messages