Author: cwittich Date: Tue May 26 22:50:09 2009 New Revision: 41127
URL: http://svn.reactos.org/svn/reactos?rev=41127&view=rev Log: -check for invalid pid to prevent an endless loop -add a label to show text entered into raw traffic window
Modified: trunk/tools/reactosdbg/DebugProtocol/KDBG.cs trunk/tools/reactosdbg/RosDBG/RawTraffic.Designer.cs trunk/tools/reactosdbg/RosDBG/RawTraffic.cs
Modified: trunk/tools/reactosdbg/DebugProtocol/KDBG.cs URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/DebugProtocol/KDBG... ============================================================================== --- trunk/tools/reactosdbg/DebugProtocol/KDBG.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/DebugProtocol/KDBG.cs [iso-8859-1] Tue May 26 22:50:09 2009 @@ -395,7 +395,8 @@
public void GetThreads(ulong pid) { - QueueCommand(string.Format("thread list 0x{0:X8}", pid)); + if (pid != 0) + QueueCommand(string.Format("thread list 0x{0:X8}", pid)); }
public void SetProcess(ulong pid)
Modified: trunk/tools/reactosdbg/RosDBG/RawTraffic.Designer.cs URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/RawTraffic.... ============================================================================== --- trunk/tools/reactosdbg/RosDBG/RawTraffic.Designer.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/RawTraffic.Designer.cs [iso-8859-1] Tue May 26 22:50:09 2009 @@ -29,6 +29,7 @@ private void InitializeComponent() { this.RawTrafficText = new System.Windows.Forms.TextBox(); + this.InputLabel = new System.Windows.Forms.Label(); this.SuspendLayout(); // // RawTrafficText @@ -40,17 +41,27 @@ this.RawTrafficText.Name = "RawTrafficText"; this.RawTrafficText.ReadOnly = true; this.RawTrafficText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.RawTrafficText.Size = new System.Drawing.Size(150, 150); + this.RawTrafficText.Size = new System.Drawing.Size(413, 289); this.RawTrafficText.TabIndex = 0; this.RawTrafficText.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.RawTrafficText_KeyPress); this.RawTrafficText.MouseUp += new System.Windows.Forms.MouseEventHandler(this.RawTrafficText_MouseUp); + // + // InputLabel + // + this.InputLabel.AutoSize = true; + this.InputLabel.Location = new System.Drawing.Point(91, 236); + this.InputLabel.Name = "InputLabel"; + this.InputLabel.Size = new System.Drawing.Size(0, 13); + this.InputLabel.TabIndex = 1; // // RawTraffic // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.InputLabel); this.Controls.Add(this.RawTrafficText); this.Name = "RawTraffic"; + this.Size = new System.Drawing.Size(413, 289); this.ResumeLayout(false); this.PerformLayout();
@@ -59,5 +70,6 @@ #endregion
private System.Windows.Forms.TextBox RawTrafficText; + private System.Windows.Forms.Label InputLabel; } }
Modified: trunk/tools/reactosdbg/RosDBG/RawTraffic.cs URL: http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/RawTraffic.... ============================================================================== --- trunk/tools/reactosdbg/RosDBG/RawTraffic.cs [iso-8859-1] (original) +++ trunk/tools/reactosdbg/RosDBG/RawTraffic.cs [iso-8859-1] Tue May 26 22:50:09 2009 @@ -40,6 +40,9 @@ //TODO: skip backspace signs } RawTrafficText.AppendText(toAdd.ToString()); + InputLabel.Location = RawTrafficText.GetPositionFromCharIndex(RawTrafficText.Text.Length -1); + InputLabel.Top += 2; + InputLabel.Left += 2; }
void DebugRawTrafficEvent(object sender, DebugRawTrafficEventArgs args) @@ -61,10 +64,25 @@ { InitializeComponent(); this.Tag = "Raw Traffic"; + InputLabel.Location = new Point(2, 2); }
private void RawTrafficText_KeyPress(object sender, KeyPressEventArgs e) { + switch ((int)e.KeyChar) + { + case 8: /* Backspace */ + if (InputLabel.Text.Length > 0) + InputLabel.Text = InputLabel.Text.Substring(0, InputLabel.Text.Length -1); + break; + case 13: /* Return */ + InputLabel.Text = ""; + break; + default: + InputLabel.Text += e.KeyChar; + break; + } + mConnection.Debugger.Write("" + e.KeyChar); }