[ros-diffs] [cwittich] 22471: -fixed some bugs -added GDBPort to Debug Class

cwittich at svn.reactos.org cwittich at svn.reactos.org
Wed Jun 21 18:56:06 CEST 2006


Author: cwittich
Date: Wed Jun 21 20:56:05 2006
New Revision: 22471

URL: http://svn.reactos.ru/svn/reactos?rev=22471&view=rev
Log:
-fixed some bugs
-added GDBPort to Debug Class

Modified:
    trunk/tools/Qemu GUI/QEmu.cs
    trunk/tools/Qemu GUI/Qemu GUI.suo
    trunk/tools/Qemu GUI/frmMain.cs

Modified: trunk/tools/Qemu GUI/QEmu.cs
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/QEmu.cs?rev=22471&r1=22470&r2=22471&view=diff
==============================================================================
--- trunk/tools/Qemu GUI/QEmu.cs (original)
+++ trunk/tools/Qemu GUI/QEmu.cs Wed Jun 21 20:56:05 2006
@@ -34,8 +34,8 @@
             long d = Size * 1024;
             string argv = " create -f " + Format + " \""+ FileName + "\" " + d.ToString(); ;
             Process p = new Process();
-            p.StartInfo.FileName = Path.GetDirectoryName (this.Paths.QEmu) + "\\" + "qemu-img.exe";
-            p.StartInfo.WorkingDirectory = Path.GetDirectoryName(this.Paths.QEmu);
+            p.StartInfo.FileName = this.Paths.QEmu + "\\" + "qemu-img.exe";
+            p.StartInfo.WorkingDirectory = this.Paths.QEmu;
             p.StartInfo.Arguments = argv;
             p.StartInfo.RedirectStandardError = true;
             p.StartInfo.UseShellExecute = false;
@@ -64,16 +64,16 @@
         {
             Process p = new Process();
             
-            if (platfrom == "Standard PC 32Bits") 
-                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu.exe";
-            if (platfrom == "Standard PC 64Bits") 
-                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu-system-x86_64.exe"; 
-            if (platfrom == "ISA only PC 32Bits") 
-                p.StartInfo.FileName = this.Paths.QEmu+"\\qemu.exe";
-            if (platfrom == "ISA only PC 64Bits")
+            if (platfrom == "Standard PC 32Bit") 
+                p.StartInfo.FileName = this.Paths.QEmu + "\\qemu.exe";
+            if (platfrom == "Standard PC 64Bit") 
+                p.StartInfo.FileName = this.Paths.QEmu + "\\qemu-system-x86_64.exe"; 
+            if (platfrom == "ISA only PC 32Bit") 
+                p.StartInfo.FileName = this.Paths.QEmu + "\\qemu.exe";
+            if (platfrom == "ISA only PC 64Bit")
                 p.StartInfo.FileName = this.Paths.QEmu + "\\qemu-system-x86_64.exe"; 
                        
-            p.StartInfo.WorkingDirectory = Path.GetDirectoryName(this.Paths.QEmu);
+            p.StartInfo.WorkingDirectory = this.Paths.QEmu;
             p.StartInfo.Arguments = GetArgv();
             p.StartInfo.RedirectStandardError = true;
             p.StartInfo.UseShellExecute = false;
@@ -377,6 +377,8 @@
 
         [XmlElement("VBE3")]
         public bool VBE3;
+        [XmlElement("GDBPort")]
+        public int GDBPort;
 
         public override string ToString()
         {
@@ -399,6 +401,9 @@
             /*  Standard VGA */
             if (this.VBE3)
                 buffer += "-std-vga ";
+
+            if (this.GDBPort != "1234")
+                buffer += "-p " + this.GDBPort.ToString() + " ";
 
             return buffer;
         }

Modified: trunk/tools/Qemu GUI/Qemu GUI.suo
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/Qemu%20GUI.suo?rev=22471&r1=22470&r2=22471&view=diff
==============================================================================
Binary files - no diff available.

Modified: trunk/tools/Qemu GUI/frmMain.cs
URL: http://svn.reactos.ru/svn/reactos/trunk/tools/Qemu%20GUI/frmMain.cs?rev=22471&r1=22470&r2=22471&view=diff
==============================================================================
--- trunk/tools/Qemu GUI/frmMain.cs (original)
+++ trunk/tools/Qemu GUI/frmMain.cs Wed Jun 21 20:56:05 2006
@@ -125,7 +125,7 @@
         private Label lblImage;
         private TextBox txtVDKImage;
         private ComboBox cboVDKDrive;
-        private ComboBox cboMachineFrom;
+        private ComboBox cboMachine;
         private QEmu qemu;
 
 		public frmMain()
@@ -164,7 +164,7 @@
 		{
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
             this.grpMachine = new System.Windows.Forms.GroupBox();
-            this.cboMachineFrom = new System.Windows.Forms.ComboBox();
+            this.cboMachine = new System.Windows.Forms.ComboBox();
             this.HardDisk2 = new System.Windows.Forms.TabControl();
             this.tabMisc = new System.Windows.Forms.TabPage();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
@@ -308,7 +308,7 @@
             // 
             // grpMachine
             // 
-            this.grpMachine.Controls.Add(this.cboMachineFrom);
+            this.grpMachine.Controls.Add(this.cboMachine);
             this.grpMachine.Location = new System.Drawing.Point(3, 3);
             this.grpMachine.Name = "grpMachine";
             this.grpMachine.Size = new System.Drawing.Size(274, 48);
@@ -316,20 +316,20 @@
             this.grpMachine.TabStop = false;
             this.grpMachine.Text = "Machine";
             // 
-            // cboMachineFrom
-            // 
-            this.cboMachineFrom.DisplayMember = "1";
-            this.cboMachineFrom.FormattingEnabled = true;
-            this.cboMachineFrom.Items.AddRange(new object[] {
+            // cboMachine
+            // 
+            this.cboMachine.DisplayMember = "1";
+            this.cboMachine.FormattingEnabled = true;
+            this.cboMachine.Items.AddRange(new object[] {
             "Standard PC 32Bits",
             "ISA only PC 32Bits",
             "Standard PC 64Bits",
             "ISA only PC 64Bits"});
-            this.cboMachineFrom.Location = new System.Drawing.Point(19, 19);
-            this.cboMachineFrom.Name = "cboMachineFrom";
-            this.cboMachineFrom.Size = new System.Drawing.Size(239, 21);
-            this.cboMachineFrom.TabIndex = 20;
-            this.cboMachineFrom.SelectedIndexChanged += new System.EventHandler(this.cboMachineFrom_SelectedIndexChanged);
+            this.cboMachine.Location = new System.Drawing.Point(19, 19);
+            this.cboMachine.Name = "cboMachine";
+            this.cboMachine.Size = new System.Drawing.Size(239, 21);
+            this.cboMachine.TabIndex = 20;
+            this.cboMachine.SelectedIndexChanged += new System.EventHandler(this.cboMachineFrom_SelectedIndexChanged);
             // 
             // HardDisk2
             // 
@@ -1660,7 +1660,7 @@
         private void btnLaunch_Click(object sender, System.EventArgs e)
         {
             SaveSettings();
-            if (!qemu.Start(cboMachineFrom.SelectedItem.ToString()))
+            if (!qemu.Start(cboMachine.SelectedItem.ToString()))
             {
                 frmError fError = new frmError();
                 fError.txtError.Text = qemu.GetLastError();
@@ -1676,11 +1676,6 @@
             if (checkBox14.Checked == true)
             {                
                 arg = arg + "-s ";
-            }
-
-            if (txtGDBPort.Text != "1234")
-            {
-                arg = arg + "-p "+txtGDBPort.Text+" ";
             }
 
             // qemu state
@@ -1724,7 +1719,7 @@
             cboCDROM.SelectedIndex = 0;
             cboBootFrom.SelectedIndex = 1;
             cboImageFormat.SelectedIndex = 4;
-            cboMachineFrom.SelectedIndex = 0;
+            cboMachine.SelectedIndex = 0;
 
             /* try to load config.xml from current directory */
             try
@@ -1771,8 +1766,6 @@
         #region Paths
         private void btnQEmuPath_Click(object sender, EventArgs e)
         {
-            //openFile.Filter = "Executable files (*.exe)|*.exe"; 
-
             if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
             {
                 txtQEmuPath.Text = folderBrowserDialog1.SelectedPath;
@@ -1824,7 +1817,7 @@
         private void LoadSettings()
         {
             /* Misc */
-            cboMachineFrom.Text = qemu.Misc.Machine;            
+            cboMachine.Text = qemu.Misc.Machine;  
             numMemory.Value = qemu.Misc.Memory;
             numSMP.Value = qemu.Misc.CPUs;
             cboBootFrom.Text = qemu.Misc.BootFrom;
@@ -1871,13 +1864,14 @@
             chkSerialToFile.Checked = qemu.Debug.SerialPort.Redirect;
             chkParallelToFile.Checked = qemu.Debug.ParallelPort.Redirect;
             chkVBE30.Checked = qemu.Debug.VBE3;
+            txtGDBPort.Text = qemu.Debug.GDBPort.ToString();     
 
         }
 
         private void SaveSettings()
         {
             /* Misc */            
-            qemu.Misc.Machine = cboMachineFrom.SelectedText;
+            qemu.Misc.Machine = cboMachine.SelectedText;
             qemu.Misc.Memory = (int) numMemory.Value;
             qemu.Misc.CPUs = (int) numSMP.Value;
             qemu.Misc.BootFrom = cboBootFrom.Text;
@@ -1922,6 +1916,7 @@
             qemu.Debug.SerialPort.Redirect = chkSerialToFile.Checked;
             qemu.Debug.ParallelPort.Redirect = chkParallelToFile.Checked;
             qemu.Debug.VBE3 = chkVBE30.Checked;
+            qemu.Debug.GDBPort = Int32.Parse(txtGDBPort.Text);
         }
 
         #endregion




More information about the Ros-diffs mailing list