[pspplayer commit] r598 - in trunk/Noxa.Emulation.Psp.Player/Debugger: . Tools

2 views
Skip to first unread message

codesite...@google.com

unread,
Mar 29, 2008, 5:47:16 PM3/29/08
to psppla...@googlegroups.com
Author: ben.vanik
Date: Sat Mar 29 14:46:04 2008
New Revision: 598

Modified:
trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.Designer.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.Designer.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.Designer.cs

Log:
Cleaned up callstack - now show method names
Tweaked layout/sizing of things so it looks right

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.Designer.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.Designer.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.Designer.cs
Sat Mar 29 14:46:04 2008
@@ -131,7 +131,7 @@
this.helpMenu} );
this.menuStrip.Location = new System.Drawing.Point( 0, 0 );
this.menuStrip.Name = "menuStrip";
- this.menuStrip.Size = new System.Drawing.Size( 986, 24 );
+ this.menuStrip.Size = new System.Drawing.Size( 1294, 24 );
this.menuStrip.TabIndex = 0;
this.menuStrip.Text = "MenuStrip";
//
@@ -571,9 +571,9 @@
//
this.statusStrip.Items.AddRange( new
System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel} );
- this.statusStrip.Location = new System.Drawing.Point( 0, 683 );
+ this.statusStrip.Location = new System.Drawing.Point( 0, 784 );
this.statusStrip.Name = "statusStrip";
- this.statusStrip.Size = new System.Drawing.Size( 986, 22 );
+ this.statusStrip.Size = new System.Drawing.Size( 1294, 22 );
this.statusStrip.TabIndex = 2;
this.statusStrip.Text = "StatusStrip";
//
@@ -613,7 +613,7 @@
this.toolStripSeparator12} );
this.controlToolStrip.Location = new System.Drawing.Point( 0, 24 );
this.controlToolStrip.Name = "controlToolStrip";
- this.controlToolStrip.Size = new System.Drawing.Size( 986, 25 );
+ this.controlToolStrip.Size = new System.Drawing.Size( 1294, 25 );
this.controlToolStrip.TabIndex = 4;
//
// resumeToolStripButton
@@ -840,14 +840,14 @@
this.dockPanel.Location = new System.Drawing.Point( 0, 49 );
this.dockPanel.Name = "dockPanel";
this.dockPanel.ShowDocumentIcon = true;
- this.dockPanel.Size = new System.Drawing.Size( 986, 634 );
+ this.dockPanel.Size = new System.Drawing.Size( 1294, 735 );
this.dockPanel.TabIndex = 6;
//
// DebuggerWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size( 986, 705 );
+ this.ClientSize = new System.Drawing.Size( 1294, 806 );
this.Controls.Add( this.dockPanel );
this.Controls.Add( this.controlToolStrip );
this.Controls.Add( this.statusStrip );

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.cs Sat Mar
29 14:46:04 2008
@@ -72,10 +72,17 @@
// ...

this.Window.Show();
- foreach( DebuggerTool tool in this.Tools )
- {
- tool.Show( this.Window.DockPanel );
- }
+
+ this.CodeTool.Show( this.Window.DockPanel );
+ this.LogTool.Show( this.Window.DockPanel );
+
+ WeifenLuo.WinFormsUI.Docking.DockPane dp;
+ dp = this.Window.DockPanel.DockPaneFactory.CreateDockPane(
this.CodeTool, WeifenLuo.WinFormsUI.Docking.DockState.Document, true );
+ this.StatisticsTool.Show( dp,
WeifenLuo.WinFormsUI.Docking.DockAlignment.Right, 0.45 );
+ dp = this.Window.DockPanel.DockPaneFactory.CreateDockPane(
this.LogTool, WeifenLuo.WinFormsUI.Docking.DockState.DockBottom, true );
+ this.CallstackTool.Show( dp,
WeifenLuo.WinFormsUI.Docking.DockAlignment.Right, 0.24 );
+
+ this.MemoryTool.Show( this.StatisticsTool.DockHandler.Pane,
this.StatisticsTool );

this.Host.Debugger.Activate( this, Environment.MachineName,
Environment.UserName, "InprocDebugger 1.0" );


Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.Designer.cs
==============================================================================
---
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.Designer.cs (original)
+++
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.Designer.cs
Sat Mar 29 14:46:04 2008
@@ -29,7 +29,7 @@
/// </summary>
private void InitializeComponent()
{
- this.callView = new DoubleBufferedListView();
+ this.callView = new Noxa.Utilities.Controls.DoubleBufferedListView();
this.iconHeader = new System.Windows.Forms.ColumnHeader();
this.nameHeader = new System.Windows.Forms.ColumnHeader();
this.locationHeader = new System.Windows.Forms.ColumnHeader();
@@ -42,25 +42,30 @@
this.nameHeader,
this.locationHeader} );
this.callView.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.callView.ExtendedStyle = ( (
Noxa.Utilities.Controls.ListViewExtendedStyle )( ( ( (
Noxa.Utilities.Controls.ListViewExtendedStyle.GridLines |
Noxa.Utilities.Controls.ListViewExtendedStyle.FullRowSelect )
+ | Noxa.Utilities.Controls.ListViewExtendedStyle.BorderSelect )
+ | Noxa.Utilities.Controls.ListViewExtendedStyle.DoubleBuffer ) ) );
+ this.callView.Font = new System.Drawing.Font( "Courier New", 8.25F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (
( byte )( 0 ) ) );
this.callView.FullRowSelect = true;
this.callView.GridLines = true;
this.callView.Location = new System.Drawing.Point( 0, 0 );
this.callView.MultiSelect = false;
this.callView.Name = "callView";
- this.callView.Size = new System.Drawing.Size( 670, 168 );
+ this.callView.Size = new System.Drawing.Size( 324, 162 );
this.callView.TabIndex = 0;
this.callView.UseCompatibleStateImageBehavior = false;
this.callView.View = System.Windows.Forms.View.Details;
+ this.callView.MouseDown += new
System.Windows.Forms.MouseEventHandler( this.callView_MouseDown );
//
// iconHeader
//
this.iconHeader.Text = "";
- this.iconHeader.Width = 25;
+ this.iconHeader.Width = 0;
//
// nameHeader
//
this.nameHeader.Text = "Name";
- this.nameHeader.Width = 500;
+ this.nameHeader.Width = 165;
//
// locationHeader
//
@@ -69,10 +74,10 @@
//
// CallstackTool
//
- this.Controls.Add( this.callView );
this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
- this.ClientSize = new System.Drawing.Size( 670, 168 );
+ this.ClientSize = new System.Drawing.Size( 324, 162 );
this.CloseButton = false;
+ this.Controls.Add( this.callView );
this.DockAreas = ( ( WeifenLuo.WinFormsUI.Docking.DockAreas )( ( (
( ( WeifenLuo.WinFormsUI.Docking.DockAreas.Float |
WeifenLuo.WinFormsUI.Docking.DockAreas.DockLeft )
| WeifenLuo.WinFormsUI.Docking.DockAreas.DockRight )
| WeifenLuo.WinFormsUI.Docking.DockAreas.DockTop )

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CallstackTool.cs Sat
Mar 29 14:46:04 2008
@@ -12,6 +12,7 @@
using System.Text;
using System.Windows.Forms;
using Noxa.Emulation.Psp.Debugging.DebugModel;
+using Noxa.Emulation.Psp.Player.Debugger.Model;

namespace Noxa.Emulation.Psp.Player.Debugger.Tools
{
@@ -47,7 +48,7 @@
this.Clear();
return;
}
-
+
this.callView.BeginUpdate();
this.callView.Items.Clear();
foreach( Frame frame in callStack )
@@ -71,7 +72,13 @@
default:
case FrameType.UserCode:
// Try to resolve the name
- pretty = "(unknown)";
+ {
+ MethodBody body = this.Debugger.CodeCache[ ( uint
)frame.Address ];
+ if( body == null )
+ pretty = "(unknown)";
+ else
+ pretty = string.Format( "{0}+0x{1:X}", body.Name,
frame.Address - body.Address );
+ }
break;
}
ListViewItem item = new ListViewItem( new string[]{
@@ -85,6 +92,17 @@
}
this.callView.EndUpdate();
this.callView.Enabled = true;
+ }
+
+ private void callView_MouseDown( object sender, MouseEventArgs e )
+ {
+ if( e.Clicks == 2 )
+ {
+ ListViewItem item = this.callView.GetItemAt( e.X, e.Y );
+ Frame frame = item.Tag as Frame;
+ if( frame.Type == FrameType.UserCode )
+ this.Debugger.CodeTool.SetAddress( ( uint )frame.Address, false );
+ }
}
}
}

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.Designer.cs
==============================================================================
---
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.Designer.cs (original)
+++
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/MemoryTool.Designer.cs
Sat Mar 29 14:46:04 2008
@@ -38,7 +38,6 @@
this.hexBox.Anchor = ( ( System.Windows.Forms.AnchorStyles )( ( ( (
System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Bottom )
| System.Windows.Forms.AnchorStyles.Left )
| System.Windows.Forms.AnchorStyles.Right ) ) );
- this.hexBox.BytesPerLine = 24;
this.hexBox.Font = new System.Drawing.Font( "Courier New", 8F,
System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (
( byte )( 0 ) ) );
this.hexBox.LineInfoForeColor = System.Drawing.Color.Empty;
this.hexBox.LineInfoVisible = true;

Reply all
Reply to author
Forward
0 new messages