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

0 views
Skip to first unread message

codesite...@google.com

unread,
Mar 29, 2008, 4:47:00 PM3/29/08
to psppla...@googlegroups.com
Author: ben.vanik
Date: Sat Mar 29 13:46:33 2008
New Revision: 597

Added:
trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.Designer.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.resx
Modified:
trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.Designer.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.Navigation.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Model/CodeCache.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeTool.cs
trunk/Noxa.Emulation.Psp.Player/Debugger/Tools/CodeViewControl.cs
trunk/Noxa.Emulation.Psp.Player/Noxa.Emulation.Psp.Player.csproj

Log:
Jump to Method added - does autocomplete of all method names - not a list like IDA, but I don't really need that.
Can navigate through the stack using ctrl-left/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 13:46:33 2008
@@ -42,6 +42,7 @@
this.jumpMenu = new System.Windows.Forms.ToolStripMenuItem();
this.jumpToOperandToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.jumpToAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.jumpToMethodToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripSeparator();
this.nextLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.previousLocationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -208,6 +209,7 @@
this.jumpMenu.DropDownItems.AddRange( new System.Windows.Forms.ToolStripItem[] {
this.jumpToOperandToolStripMenuItem,
this.jumpToAddressToolStripMenuItem,
+ this.jumpToMethodToolStripMenuItem,
this.toolStripMenuItem4,
this.nextLocationToolStripMenuItem,
this.previousLocationToolStripMenuItem,
@@ -223,7 +225,7 @@
// jumpToOperandToolStripMenuItem
//
this.jumpToOperandToolStripMenuItem.Name = "jumpToOperandToolStripMenuItem";
- this.jumpToOperandToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.jumpToOperandToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.jumpToOperandToolStripMenuItem.Text = "Jump to &Operand";
this.jumpToOperandToolStripMenuItem.Click += new System.EventHandler( this.jumpToOperandToolStripMenuItem_Click );
//
@@ -231,20 +233,29 @@
//
this.jumpToAddressToolStripMenuItem.Name = "jumpToAddressToolStripMenuItem";
this.jumpToAddressToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G ) ) );
- this.jumpToAddressToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.jumpToAddressToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.jumpToAddressToolStripMenuItem.Text = "Jump to &Address";
this.jumpToAddressToolStripMenuItem.Click += new System.EventHandler( this.jumpToAddressToolStripMenuItem_Click );
//
+ // jumpToMethodToolStripMenuItem
+ //
+ this.jumpToMethodToolStripMenuItem.Name = "jumpToMethodToolStripMenuItem";
+ this.jumpToMethodToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.M ) ) );
+ this.jumpToMethodToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
+ this.jumpToMethodToolStripMenuItem.Text = "Jump to &Method";
+ this.jumpToMethodToolStripMenuItem.Click += new System.EventHandler( this.jumpToMethodToolStripMenuItem_Click );
+ //
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
- this.toolStripMenuItem4.Size = new System.Drawing.Size( 201, 6 );
+ this.toolStripMenuItem4.Size = new System.Drawing.Size( 219, 6 );
//
// nextLocationToolStripMenuItem
//
this.nextLocationToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.NextLocationIcon;
this.nextLocationToolStripMenuItem.Name = "nextLocationToolStripMenuItem";
- this.nextLocationToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.nextLocationToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Right ) ) );
+ this.nextLocationToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.nextLocationToolStripMenuItem.Text = "&Next Location";
this.nextLocationToolStripMenuItem.Click += new System.EventHandler( this.nextLocationToolStripMenuItem_Click );
//
@@ -252,20 +263,21 @@
//
this.previousLocationToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.PreviousLocationIcon;
this.previousLocationToolStripMenuItem.Name = "previousLocationToolStripMenuItem";
- this.previousLocationToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.previousLocationToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Left ) ) );
+ this.previousLocationToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.previousLocationToolStripMenuItem.Text = "&Previous Location";
this.previousLocationToolStripMenuItem.Click += new System.EventHandler( this.previousLocationToolStripMenuItem_Click );
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
- this.toolStripMenuItem5.Size = new System.Drawing.Size( 201, 6 );
+ this.toolStripMenuItem5.Size = new System.Drawing.Size( 219, 6 );
//
// toggleBookmarkToolStripMenuItem
//
this.toggleBookmarkToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.BookmarkIcon;
this.toggleBookmarkToolStripMenuItem.Name = "toggleBookmarkToolStripMenuItem";
- this.toggleBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.toggleBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.toggleBookmarkToolStripMenuItem.Text = "&Toggle Bookmark";
this.toggleBookmarkToolStripMenuItem.Click += new System.EventHandler( this.toggleBookmarkToolStripMenuItem_Click );
//
@@ -273,7 +285,7 @@
//
this.nextBookmarkToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.NextBookmarkIcon;
this.nextBookmarkToolStripMenuItem.Name = "nextBookmarkToolStripMenuItem";
- this.nextBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.nextBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.nextBookmarkToolStripMenuItem.Text = "Next &Bookmark";
this.nextBookmarkToolStripMenuItem.Click += new System.EventHandler( this.nextBookmarkToolStripMenuItem_Click );
//
@@ -281,7 +293,7 @@
//
this.previousBookmarkToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.PreviousBookmarkIcon;
this.previousBookmarkToolStripMenuItem.Name = "previousBookmarkToolStripMenuItem";
- this.previousBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.previousBookmarkToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.previousBookmarkToolStripMenuItem.Text = "P&revious Bookmark";
this.previousBookmarkToolStripMenuItem.Click += new System.EventHandler( this.previousBookmarkToolStripMenuItem_Click );
//
@@ -289,7 +301,7 @@
//
this.clearAllBookmarksToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.DeleteAllBookmarksIcon;
this.clearAllBookmarksToolStripMenuItem.Name = "clearAllBookmarksToolStripMenuItem";
- this.clearAllBookmarksToolStripMenuItem.Size = new System.Drawing.Size( 204, 22 );
+ this.clearAllBookmarksToolStripMenuItem.Size = new System.Drawing.Size( 222, 22 );
this.clearAllBookmarksToolStripMenuItem.Text = "&Clear All Bookmarks";
this.clearAllBookmarksToolStripMenuItem.Click += new System.EventHandler( this.clearAllBookmarksToolStripMenuItem_Click );
//
@@ -320,7 +332,7 @@
this.resumeToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.PlayIcon;
this.resumeToolStripMenuItem.Name = "resumeToolStripMenuItem";
this.resumeToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F5;
- this.resumeToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.resumeToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.resumeToolStripMenuItem.Text = "&Resume";
this.resumeToolStripMenuItem.Click += new System.EventHandler( this.resumeToolStripMenuItem_Click );
//
@@ -330,7 +342,7 @@
this.breakToolStripMenuItem.Name = "breakToolStripMenuItem";
this.breakToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt )
| System.Windows.Forms.Keys.B ) ) );
- this.breakToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.breakToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.breakToolStripMenuItem.Text = "&Break";
this.breakToolStripMenuItem.Click += new System.EventHandler( this.breakToolStripMenuItem_Click );
//
@@ -339,7 +351,7 @@
this.stopToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.StopIcon;
this.stopToolStripMenuItem.Name = "stopToolStripMenuItem";
this.stopToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F5 ) ) );
- this.stopToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.stopToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.stopToolStripMenuItem.Text = "&Stop";
this.stopToolStripMenuItem.Click += new System.EventHandler( this.stopToolStripMenuItem_Click );
//
@@ -349,14 +361,14 @@
this.restartToolStripMenuItem.Name = "restartToolStripMenuItem";
this.restartToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( ( System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift )
| System.Windows.Forms.Keys.F5 ) ) );
- this.restartToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.restartToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.restartToolStripMenuItem.Text = "R&estart";
this.restartToolStripMenuItem.Click += new System.EventHandler( this.restartToolStripMenuItem_Click );
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
- this.toolStripMenuItem3.Size = new System.Drawing.Size( 203, 6 );
+ this.toolStripMenuItem3.Size = new System.Drawing.Size( 236, 6 );
//
// showNextStatementToolStripMenuItem
//
@@ -372,7 +384,7 @@
this.stepIntoToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.StepIntoIcon;
this.stepIntoToolStripMenuItem.Name = "stepIntoToolStripMenuItem";
this.stepIntoToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F11;
- this.stepIntoToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.stepIntoToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.stepIntoToolStripMenuItem.Text = "Step &Into";
this.stepIntoToolStripMenuItem.Click += new System.EventHandler( this.stepIntoToolStripMenuItem_Click );
//
@@ -381,7 +393,7 @@
this.stepOverToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.StepOverIcon;
this.stepOverToolStripMenuItem.Name = "stepOverToolStripMenuItem";
this.stepOverToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F10;
- this.stepOverToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.stepOverToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.stepOverToolStripMenuItem.Text = "Step &Over";
this.stepOverToolStripMenuItem.Click += new System.EventHandler( this.stepOverToolStripMenuItem_Click );
//
@@ -390,7 +402,7 @@
this.stepOutToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.StepOutIcon;
this.stepOutToolStripMenuItem.Name = "stepOutToolStripMenuItem";
this.stepOutToolStripMenuItem.ShortcutKeys = ( ( System.Windows.Forms.Keys )( ( System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.F11 ) ) );
- this.stepOutToolStripMenuItem.Size = new System.Drawing.Size( 206, 22 );
+ this.stepOutToolStripMenuItem.Size = new System.Drawing.Size( 239, 22 );
this.stepOutToolStripMenuItem.Text = "Step Ou&t";
this.stepOutToolStripMenuItem.Click += new System.EventHandler( this.stepOutToolStripMenuItem_Click );
//
@@ -417,80 +429,80 @@
//
this.codeViewToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.DisassemblyIcon;
this.codeViewToolStripMenuItem.Name = "codeViewToolStripMenuItem";
- this.codeViewToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.codeViewToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.codeViewToolStripMenuItem.Text = "&Code View";
//
// memoryToolStripMenuItem
//
this.memoryToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.MemoryIcon;
this.memoryToolStripMenuItem.Name = "memoryToolStripMenuItem";
- this.memoryToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.memoryToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.memoryToolStripMenuItem.Text = "&Memory";
//
// callstackToolStripMenuItem
//
this.callstackToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.CallstackIcon;
this.callstackToolStripMenuItem.Name = "callstackToolStripMenuItem";
- this.callstackToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.callstackToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.callstackToolStripMenuItem.Text = "&Callstack";
//
// registersToolStripMenuItem
//
this.registersToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.RegistersIcon;
this.registersToolStripMenuItem.Name = "registersToolStripMenuItem";
- this.registersToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.registersToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.registersToolStripMenuItem.Text = "&Registers";
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
- this.toolStripMenuItem2.Size = new System.Drawing.Size( 149, 6 );
+ this.toolStripMenuItem2.Size = new System.Drawing.Size( 148, 6 );
//
// biosToolStripMenuItem
//
this.biosToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.OsIcon;
this.biosToolStripMenuItem.Name = "biosToolStripMenuItem";
- this.biosToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.biosToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.biosToolStripMenuItem.Text = "&BIOS Inspector";
//
// threadsToolStripMenuItem
//
this.threadsToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.ThreadsIcon;
this.threadsToolStripMenuItem.Name = "threadsToolStripMenuItem";
- this.threadsToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.threadsToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.threadsToolStripMenuItem.Text = "&Threads";
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
- this.toolStripMenuItem1.Size = new System.Drawing.Size( 149, 6 );
+ this.toolStripMenuItem1.Size = new System.Drawing.Size( 148, 6 );
//
// breakpointsToolStripMenuItem
//
this.breakpointsToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.BreakpointsIcon;
this.breakpointsToolStripMenuItem.Name = "breakpointsToolStripMenuItem";
- this.breakpointsToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.breakpointsToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.breakpointsToolStripMenuItem.Text = "B&reakpoints";
//
// watchesToolStripMenuItem
//
this.watchesToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.WatchesIcon;
this.watchesToolStripMenuItem.Name = "watchesToolStripMenuItem";
- this.watchesToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.watchesToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.watchesToolStripMenuItem.Text = "&Watches";
//
// statisticsToolStripMenuItem
//
this.statisticsToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.StatisticsIcon;
this.statisticsToolStripMenuItem.Name = "statisticsToolStripMenuItem";
- this.statisticsToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.statisticsToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.statisticsToolStripMenuItem.Text = "&Statistics";
//
// logViewToolStripMenuItem
//
this.logViewToolStripMenuItem.Image = global::Noxa.Emulation.Psp.Player.Properties.Resources.OutputIcon;
this.logViewToolStripMenuItem.Name = "logViewToolStripMenuItem";
- this.logViewToolStripMenuItem.Size = new System.Drawing.Size( 152, 22 );
+ this.logViewToolStripMenuItem.Size = new System.Drawing.Size( 151, 22 );
this.logViewToolStripMenuItem.Text = "&Log View";
//
// toolsMenu
@@ -940,6 +952,7 @@
private System.Windows.Forms.ToolStripMenuItem nextBookmarkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem previousBookmarkToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearAllBookmarksToolStripMenuItem;
+ private System.Windows.Forms.ToolStripMenuItem jumpToMethodToolStripMenuItem;
}
}

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/DebuggerWindow.cs Sat Mar 29 13:46:33 2008
@@ -85,14 +85,19 @@
this.Debugger.ShowJumpToAddressDialog( target );
}

- private void nextLocationToolStripMenuItem_Click( object sender, EventArgs e )
+ private void jumpToMethodToolStripMenuItem_Click( object sender, EventArgs e )
{
+ this.Debugger.ShowJumpToMethodDialog();
+ }

+ private void nextLocationToolStripMenuItem_Click( object sender, EventArgs e )
+ {
+ this.Debugger.CodeTool.NavigateForward();
}

private void previousLocationToolStripMenuItem_Click( object sender, EventArgs e )
{
-
+ this.Debugger.CodeTool.NavigateBack();
}

private void toggleBookmarkToolStripMenuItem_Click( object sender, EventArgs e )

Added: trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.Designer.cs
==============================================================================
--- (empty file)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.Designer.cs Sat Mar 29 13:46:33 2008
@@ -0,0 +1,112 @@
+namespace Noxa.Emulation.Psp.Player.Debugger.Dialogs
+{
+ partial class JumpToMethodDialog
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose( bool disposing )
+ {
+ if( disposing && ( components != null ) )
+ {
+ components.Dispose();
+ }
+ base.Dispose( disposing );
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.jumpButton = new System.Windows.Forms.Button();
+ this.cancelButton = new System.Windows.Forms.Button();
+ this.label1 = new System.Windows.Forms.Label();
+ this.methodTextBox = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // jumpButton
+ //
+ this.jumpButton.Anchor = ( ( System.Windows.Forms.AnchorStyles )( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.jumpButton.Location = new System.Drawing.Point( 103, 51 );
+ this.jumpButton.Name = "jumpButton";
+ this.jumpButton.Size = new System.Drawing.Size( 75, 23 );
+ this.jumpButton.TabIndex = 2;
+ this.jumpButton.Text = "&Jump";
+ this.jumpButton.UseVisualStyleBackColor = true;
+ this.jumpButton.Click += new System.EventHandler( this.jumpButton_Click );
+ //
+ // cancelButton
+ //
+ this.cancelButton.Anchor = ( ( System.Windows.Forms.AnchorStyles )( ( System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+ this.cancelButton.Location = new System.Drawing.Point( 184, 51 );
+ this.cancelButton.Name = "cancelButton";
+ this.cancelButton.Size = new System.Drawing.Size( 75, 23 );
+ this.cancelButton.TabIndex = 3;
+ this.cancelButton.Text = "&Cancel";
+ this.cancelButton.UseVisualStyleBackColor = true;
+ this.cancelButton.Click += new System.EventHandler( this.cancelButton_Click );
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point( 12, 9 );
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size( 190, 13 );
+ this.label1.TabIndex = 0;
+ this.label1.Text = "Enter the name of a method to jump to:";
+ //
+ // methodTextBox
+ //
+ this.methodTextBox.Anchor = ( ( System.Windows.Forms.AnchorStyles )( ( ( System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left )
+ | System.Windows.Forms.AnchorStyles.Right ) ) );
+ this.methodTextBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
+ this.methodTextBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;
+ this.methodTextBox.Font = new System.Drawing.Font( "Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ( ( byte )( 0 ) ) );
+ this.methodTextBox.Location = new System.Drawing.Point( 15, 25 );
+ this.methodTextBox.Name = "methodTextBox";
+ this.methodTextBox.Size = new System.Drawing.Size( 244, 20 );
+ this.methodTextBox.TabIndex = 1;
+ //
+ // JumpToMethodDialog
+ //
+ this.AcceptButton = this.jumpButton;
+ this.AutoScaleDimensions = new System.Drawing.SizeF( 6F, 13F );
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.CancelButton = this.cancelButton;
+ this.ClientSize = new System.Drawing.Size( 271, 86 );
+ this.Controls.Add( this.methodTextBox );
+ this.Controls.Add( this.label1 );
+ this.Controls.Add( this.cancelButton );
+ this.Controls.Add( this.jumpButton );
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "JumpToMethodDialog";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+ this.Text = "Jump to Method";
+ this.ResumeLayout( false );
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Button jumpButton;
+ private System.Windows.Forms.Button cancelButton;
+ private System.Windows.Forms.Label label1;
+ private System.Windows.Forms.TextBox methodTextBox;
+ }
+}
\ No newline at end of file

Added: trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.cs
==============================================================================
--- (empty file)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.cs Sat Mar 29 13:46:33 2008
@@ -0,0 +1,91 @@
+// ----------------------------------------------------------------------------
+// PSP Player Emulation Suite
+// Copyright (C) 2008 Ben Vanik (noxa)
+// Licensed under the LGPL - see License.txt in the project root for details
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Globalization;
+using System.Media;
+using System.Text;
+using System.Windows.Forms;
+using Noxa.Emulation.Psp.Player.Debugger.Model;
+
+namespace Noxa.Emulation.Psp.Player.Debugger.Dialogs
+{
+ partial class JumpToMethodDialog : Form
+ {
+ public readonly InprocDebugger Debugger;
+ public MethodBody Method;
+ private int _codeVersion = -1;
+
+ public JumpToMethodDialog()
+ {
+ this.InitializeComponent();
+
+ this.DialogResult = DialogResult.Cancel;
+ }
+
+ public JumpToMethodDialog( InprocDebugger debugger )
+ : this()
+ {
+ this.Debugger = debugger;
+ }
+
+ protected override void OnShown( EventArgs e )
+ {
+ base.OnShown( e );
+
+ if( _codeVersion != this.Debugger.CodeCache.Version )
+ {
+ this.methodTextBox.AutoCompleteCustomSource.Clear();
+ List<string> methodNames = new List<string>( this.Debugger.CodeCache.Methods.Count );
+ foreach( MethodBody method in this.Debugger.CodeCache.Methods )
+ methodNames.Add( method.Name );
+ this.methodTextBox.AutoCompleteCustomSource.AddRange( methodNames.ToArray() );
+ _codeVersion = this.Debugger.CodeCache.Version;
+ }
+ if( this.Method != null )
+ this.methodTextBox.Text = this.Method.Name;
+ }
+
+ private void jumpButton_Click( object sender, EventArgs e )
+ {
+ this.Method = null;
+ string name = this.methodTextBox.Text.Trim();
+ foreach( MethodBody method in this.Debugger.CodeCache.Methods )
+ {
+ if( method.Name == name )
+ {
+ this.Method = method;
+ break;
+ }
+ }
+ if( this.Method == null )
+ {
+ SystemSounds.Exclamation.Play();
+ this.methodTextBox.Focus();
+ this.methodTextBox.SelectAll();
+ return;
+ }
+ this.DialogResult = DialogResult.OK;
+ this.Close();
+ }
+
+ private void cancelButton_Click( object sender, EventArgs e )
+ {
+ this.DialogResult = DialogResult.Cancel;
+ this.Close();
+ }
+
+ private void JumpToMethodDialog_Activated( object sender, EventArgs e )
+ {
+ this.methodTextBox.Focus();
+ this.methodTextBox.SelectAll();
+ }
+ }
+}

Added: trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.resx
==============================================================================
--- (empty file)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Dialogs/JumpToMethodDialog.resx Sat Mar 29 13:46:33 2008
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.Navigation.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.Navigation.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/InprocDebugger.Navigation.cs Sat Mar 29 13:46:33 2008
@@ -8,6 +8,7 @@
using System.Collections.Generic;
using System.Text;
using Noxa.Emulation.Psp.Player.Debugger.Dialogs;
+using Noxa.Emulation.Psp.Player.Debugger.Model;

namespace Noxa.Emulation.Psp.Player.Debugger
{
@@ -22,11 +23,13 @@
{
private FindDialog _findDialog;
private JumpToAddressDialog _jumpToAddressDialog;
+ private JumpToMethodDialog _jumpToMethodDialog;

private void SetupNavigation()
{
_findDialog = new FindDialog();
_jumpToAddressDialog = new JumpToAddressDialog();
+ _jumpToMethodDialog = new JumpToMethodDialog( this );
}

#region Find
@@ -64,6 +67,20 @@
}
break;
}
+ }
+
+ public void ShowJumpToMethodDialog()
+ {
+ if( _jumpToMethodDialog.ShowDialog( this.Window ) == System.Windows.Forms.DialogResult.OK )
+ this.JumpToMethod( _jumpToMethodDialog.Method );
+ }
+
+ public void JumpToMethod( MethodBody method )
+ {
+ this.CodeTool.Show( this.Window.DockPanel );
+ this.CodeTool.BringToFront();
+ this.CodeTool.Activate();
+ this.CodeTool.SetAddress( method.Address, false );
}

#endregion

Modified: trunk/Noxa.Emulation.Psp.Player/Debugger/Model/CodeCache.cs
==============================================================================
--- trunk/Noxa.Emulation.Psp.Player/Debugger/Model/CodeCache.cs (original)
+++ trunk/Noxa.Emulation.Psp.Player/Debugger/Model/CodeCache.cs Sat Mar 29 13:46:33 2008
@@ -17,6 +17,8 @@
public readonly InprocDebugger Debugger;
public List<MethodBody> Methods;

+ public int Version;
+
public CodeCache( InprocDebugger debugger )
{
this.Debugger = debugger;
@@ -41,6 +43,8 @@
} );

this.LinkReferences();
+
+ this.Version++;
}

private void LinkReferences()

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 13:46:33 2008
@@ -68,5 +68,18 @@
{
this.SetAddress( this.Debugger.PC, true );
}
+
+ public bool CanNavigateBack { get { return this.codeView.CanNavigateBack; } }
+ public bool CanNavigateForward { get { return this.codeView.CanNavigateForward; } }
+
+ public void NavigateBack()
+ {
+ this.codeView.NavigateBack();
+ }
+
+ public void NavigateForward()
+ {
+ this.codeView.NavigateForward();
+ }
}
}

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 13:46:33 2008
@@ -294,6 +294,16 @@
private int _navigationIndex;
private int _highlightedLine;

+ public bool CanNavigateBack
+ {
+ get { return _navigationIndex > 0; }
+ }
+
+ public bool CanNavigateForward
+ {
+ get { return _navigationIndex < _navigationStack.Count - 1; }
+ }
+
public void ClearNavigation()
{
uint head = _navigationStack[ _navigationStack.Count - 1 ];

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 13:46:33 2008
@@ -102,6 +102,12 @@
<Compile Include="Debugger\DebuggerWindow.Designer.cs">
<DependentUpon>DebuggerWindow.cs</DependentUpon>
</Compile>
+ <Compile Include="Debugger\Dialogs\JumpToMethodDialog.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="Debugger\Dialogs\JumpToMethodDialog.Designer.cs">
+ <DependentUpon>JumpToMethodDialog.cs</DependentUpon>
+ </Compile>
<Compile Include="Debugger\Dialogs\FindDialog.cs">
<SubType>Form</SubType>
</Compile>
@@ -272,6 +278,10 @@
</EmbeddedResource>
<EmbeddedResource Include="Debugger\DebuggerWindow.resx">
<DependentUpon>DebuggerWindow.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ <EmbeddedResource Include="Debugger\Dialogs\JumpToMethodDialog.resx">
+ <DependentUpon>JumpToMethodDialog.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Debugger\Dialogs\FindDialog.resx">

Reply all
Reply to author
Forward
0 new messages