From ec8ede01f6bdb11a240613df12ffdd3fb15e13b3 Mon Sep 17 00:00:00 2001
From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498>
Date: Tue, 27 Jul 2010 00:44:41 +0000
Subject: [PATCH]
---
source2/Debug/Cosmos.Debug.GDB/FormMain.cs | 6 ++++--
source2/Debug/Cosmos.Debug.GDB/Program.cs | 9 +++++++--
source2/Debug/Cosmos.Debug.GDB/Settings.cs | 8 +++++++-
source2/Users/Kudzu/Breakpoints/Breakpoints.Cosmos | 5 +++++
source2/Users/Kudzu/Breakpoints/Breakpoints.cgdb | 2 ++
5 files changed, 25 insertions(+), 5 deletions(-)
create mode 100644 source2/Users/Kudzu/Breakpoints/Breakpoints.cgdb
diff --git a/source2/Debug/Cosmos.Debug.GDB/FormMain.cs b/source2/Debug/Cosmos.Debug.GDB/FormMain.cs
index a8be8ec55..a7c991b28 100644
--- a/source2/Debug/Cosmos.Debug.GDB/FormMain.cs
+++ b/source2/Debug/Cosmos.Debug.GDB/FormMain.cs
@@ -86,8 +86,10 @@ namespace Cosmos.Debug.GDB {
private void FormMain_Load(object sender, EventArgs e) {
Windows.mMainForm = this;
- Settings.Load();
- if (mitmConnect.Enabled) {
+ if (Settings.Filename != "") {
+ Settings.Load();
+ }
+ if (Settings.AutoConnect) {
Connect(true);
}
}
diff --git a/source2/Debug/Cosmos.Debug.GDB/Program.cs b/source2/Debug/Cosmos.Debug.GDB/Program.cs
index 71a536341..34adca6eb 100644
--- a/source2/Debug/Cosmos.Debug.GDB/Program.cs
+++ b/source2/Debug/Cosmos.Debug.GDB/Program.cs
@@ -7,8 +7,13 @@ namespace Cosmos.Debug.GDB {
static class Program {
[STAThread]
static void Main() {
- var xCLine = System.Environment.GetCommandLineArgs();
- Settings.Filename = xCLine[1];
+ var xArgs = System.Environment.GetCommandLineArgs();
+ if (xArgs.Length > 1) {
+ Settings.Filename = xArgs[1];
+ }
+ if (xArgs.Length > 2) {
+ Settings.AutoConnect = string.Compare(xArgs[2], "/Connect", true) == 0;
+ }
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
diff --git a/source2/Debug/Cosmos.Debug.GDB/Settings.cs b/source2/Debug/Cosmos.Debug.GDB/Settings.cs
index 890a5c005..fbdd5135e 100644
--- a/source2/Debug/Cosmos.Debug.GDB/Settings.cs
+++ b/source2/Debug/Cosmos.Debug.GDB/Settings.cs
@@ -7,12 +7,18 @@ using System.Windows.Forms;
namespace Cosmos.Debug.GDB {
public class Settings {
- static protected string mFilename;
+ static protected string mFilename = "";
static public string Filename {
get { return mFilename; }
set { mFilename = value; }
}
+ static protected bool mAutoConnect = false;
+ static public bool AutoConnect {
+ get { return mAutoConnect; }
+ set { mAutoConnect = value; }
+ }
+
static public SettingsDS DS = new SettingsDS();
static public void Save() {
diff --git a/source2/Users/Kudzu/Breakpoints/Breakpoints.Cosmos b/source2/Users/Kudzu/Breakpoints/Breakpoints.Cosmos
index 0b5662faf..1e674109e 100644
--- a/source2/Users/Kudzu/Breakpoints/Breakpoints.Cosmos
+++ b/source2/Users/Kudzu/Breakpoints/Breakpoints.Cosmos
@@ -57,6 +57,11 @@
Code
+
+
+ Content
+
+
diff --git a/source2/Users/Kudzu/Breakpoints/Breakpoints.cgdb b/source2/Users/Kudzu/Breakpoints/Breakpoints.cgdb
new file mode 100644
index 000000000..34840b90b
--- /dev/null
+++ b/source2/Users/Kudzu/Breakpoints/Breakpoints.cgdb
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file