Author: gedmurphy
Date: Sun Jun 21 22:25:18 2009
New Revision: 41514
URL:
http://svn.reactos.org/svn/reactos?rev=41514&view=rev
Log:
Add a built in command '.cls' command for clearing the output.
Built in commands will be prepended with a period.
Modified:
trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
Modified: trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Dockable%2…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Dockable Objects/RawTraffic.cs [iso-8859-1] Sun Jun 21
22:25:18 2009
@@ -28,6 +28,7 @@
List<string> textToAdd = new List<string>();
string kdbPrompt = "\r\nkdb:> ";
+ private string[] builtinCommands = { ".cls", ".reload" };
public RawTraffic()
@@ -48,6 +49,36 @@
mConnection = conn;
conn.DebugRawTrafficEvent += DebugRawTrafficEvent;
}
+
+ private void ParseBuiltinCommand(string command)
+ {
+ if (command == ".cls")
+ {
+ AddCommandToList(command);
+ RawTrafficText.Text = string.Empty;
+ }
+ }
+
+ private void ParseGdbCommand(string command)
+ {
+ AddCommandToList(command);
+ RawTrafficTextBox.Text += '\r'; //FIXME: remove this
+ SendCommandToDebugger();
+ RawTrafficTextBox.Text = string.Empty;
+ }
+
+ private void ParseCommand(string command)
+ {
+ if (command.StartsWith("."))
+ {
+ ParseBuiltinCommand(command);
+ }
+ else
+ {
+ ParseGdbCommand(command);
+ }
+ }
+
void UpdateText()
{
@@ -81,6 +112,12 @@
private void AddCommandToList(string cmd)
{
+ if (prevCommand.Count > 0 &&
+ prevCommand[prevCommand.Count - 1] == cmd)
+ {
+ return;
+ }
+
if (prevCommand.Count == maxCommands)
{
for (int i = 0; i < prevCommand.Count; i++)
@@ -175,10 +212,10 @@
switch (e.KeyCode)
{
case Keys.Enter:
- AddCommandToList(RawTrafficTextBox.Text);
- RawTrafficTextBox.Text += '\r'; //FIXME: remove this
- SendCommandToDebugger();
- RawTrafficTextBox.Text = string.Empty;
+ if (RawTrafficTextBox.Text.Length > 0)
+ {
+ ParseCommand(RawTrafficTextBox.Text);
+ }
break;
case Keys.Up:
Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Sun Jun 21
22:25:18 2009
@@ -39,5 +39,5 @@
// will be increased as well. MSI installers must not be generated with the same Build
Number
// otherwise they won't upgrade the old installation!
-[assembly: AssemblyVersion("1.0.2.62")]
-[assembly: AssemblyFileVersion("1.0.2.62")]
+[assembly: AssemblyVersion("1.0.2.63")]
+[assembly: AssemblyFileVersion("1.0.2.63")]