mail-archives/monodevelop-patches-list/2004-March/000690.html

316 строки
14 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Monodevelop-patches-list] r1085 - in trunk/MonoDevelop: . build/AddIns src/AddIns/BackendBindings/CSharpBinding src/Main/Base src/Main/Base/Commands src/Main/Base/Internal/Codons/LanguageBinding src/Main/Base/Internal/Project/Combine
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1085%20-%20in%20trunk/MonoDevelop%3A%20.%20build/AddIns%20src/AddIns/BackendBindings/CSharpBinding%20src/Main/Base%20src/Main/Base/Commands%20src/Main/Base/Internal/Codons/LanguageBinding%20src/Main/Base/Internal/Project/Combine&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000689.html">
<LINK REL="Next" HREF="000691.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Monodevelop-patches-list] r1085 - in trunk/MonoDevelop: . build/AddIns src/AddIns/BackendBindings/CSharpBinding src/Main/Base src/Main/Base/Commands src/Main/Base/Internal/Codons/LanguageBinding src/Main/Base/Internal/Project/Combine</H1>
<B>commit-watcher at mono-cvs.ximian.com</B>
<A HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1085%20-%20in%20trunk/MonoDevelop%3A%20.%20build/AddIns%20src/AddIns/BackendBindings/CSharpBinding%20src/Main/Base%20src/Main/Base/Commands%20src/Main/Base/Internal/Codons/LanguageBinding%20src/Main/Base/Internal/Project/Combine&In-Reply-To="
TITLE="[Monodevelop-patches-list] r1085 - in trunk/MonoDevelop: . build/AddIns src/AddIns/BackendBindings/CSharpBinding src/Main/Base src/Main/Base/Commands src/Main/Base/Internal/Codons/LanguageBinding src/Main/Base/Internal/Project/Combine">commit-watcher at mono-cvs.ximian.com
</A><BR>
<I>Wed Mar 3 01:29:43 EST 2004</I>
<P><UL>
<LI>Previous message: <A HREF="000689.html">[Monodevelop-patches-list] r1084 - in trunk/MonoDevelop: . data/resources/glade src/Main/Base/Internal/Project/Project
</A></li>
<LI>Next message: <A HREF="000691.html">[Monodevelop-patches-list] r1086 - in trunk/MonoDevelop: . src/Main/Base/Commands src/Main/Base/Gui/Dialogs
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#690">[ date ]</a>
<a href="thread.html#690">[ thread ]</a>
<a href="subject.html#690">[ subject ]</a>
<a href="author.html#690">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Author: tberman
Date: 2004-03-03 01:29:43 -0500 (Wed, 03 Mar 2004)
New Revision: 1085
Added:
trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
Modified:
trunk/MonoDevelop/ChangeLog
trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs
trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
trunk/MonoDevelop/src/Main/Base/Makefile.am
Log:
added some debugger love. i get a bt from the debugger (woo).
i cant run mdb either, im gonna talk to martin tomorrow and see what the deal is.
Modified: trunk/MonoDevelop/ChangeLog
===================================================================
--- trunk/MonoDevelop/ChangeLog 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/ChangeLog 2004-03-03 06:29:43 UTC (rev 1085)
@@ -1,3 +1,7 @@
+2004-03-03 Todd Berman &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">tberman at sevenl.net</A>&gt;
+
+ * bunch o' files: Added first pass debugger support.
+
2004-03-03 John BouAntoun &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">jba-mono at optusnet.com.au</A>&gt;
* src/Main/Base/Internal/Project/Project/IncludeFilesDialog.cs : Changed ShowDialog() to do a Dialog.Run() instead of Dialog.ShowAll().
* src/Main/Base/Internal/Project/Project/AbstractProject.cs : removed comment that said to fix the IncludeFilesDialog
Modified: trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin
===================================================================
--- trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/build/AddIns/SharpDevelopCore.addin 2004-03-03 06:29:43 UTC (rev 1085)
@@ -54,6 +54,8 @@
class = &quot;ICSharpCode.SharpDevelop.Services.AmbienceService&quot;/&gt;
&lt;Class id = &quot;MenuService&quot;
class = &quot;ICSharpCode.SharpDevelop.Services.MenuService&quot;/&gt;
+ &lt;Class id = &quot;DebuggingService&quot;
+ class = &quot;MonoDevelop.Services.DebuggingService&quot;/&gt;
&lt;/Extension&gt;
&lt;Extension path = &quot;/SharpDevelop/Workbench/DisplayBindings&quot;&gt;
@@ -744,7 +746,7 @@
&lt;MenuItem id = &quot;Run&quot; label = &quot;${res:XML.MainMenu.RunMenu}&quot;&gt;
&lt;Conditional action=&quot;Disable&quot;&gt;
&lt;Or&gt;
- &lt;Condition activewindow=&quot;ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor.ITextAreaControlProvider&quot;/&gt;
+ &lt;Condition activewindow=&quot;MonoDevelop.SourceEditor.Gui.SourceEditorDisplayBindingWrapper&quot;/&gt;
&lt;Condition iscombineopen=&quot;True&quot;/&gt;
&lt;/Or&gt;
@@ -780,7 +782,11 @@
description = &quot;${res:XML.MainMenu.RunMenu.Run.Description}&quot;
shortcut = &quot;F5&quot;
class = &quot;ICSharpCode.SharpDevelop.Commands.RunCommand&quot;/&gt;
- &lt;/Conditional&gt;
+
+ &lt;MenuItem id = &quot;DebugProject&quot;
+ label = &quot;Debug Project&quot;
+ class = &quot;MonoDevelop.Commands.DebugProject&quot;/&gt;
+ &lt;/Conditional&gt;
&lt;/MenuItem&gt;
&lt;MenuItem id = &quot;Tools&quot;
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpBindingExecutionManager.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -19,6 +19,7 @@
using ICSharpCode.SharpDevelop.Gui;
using ICSharpCode.Core.Services;
+using MonoDevelop.Services;
namespace CSharpBinding
{
@@ -27,6 +28,16 @@
/// &lt;/summary&gt;
public class CSharpBindingExecutionManager
{
+ public void Debug (IProject project)
+ {
+ FileUtilityService fileUtilityService = (FileUtilityService) ServiceManager.Services.GetService (typeof (FileUtilityService));
+ string directory = fileUtilityService.GetDirectoryNameWithSeparator(((CSharpCompilerParameters)project.ActiveConfiguration).OutputDirectory);
+ string exe = ((CSharpCompilerParameters)project.ActiveConfiguration).OutputAssembly + &quot;.exe&quot;;
+
+ DebuggingService dbgr = (DebuggingService) ServiceManager.Services.GetService (typeof (DebuggingService));
+ dbgr.Run (new string[] { Path.Combine (directory, exe) } );
+ }
+
public void Execute(string filename)
{
string exe = Path.ChangeExtension(filename, &quot;.exe&quot;);
Modified: trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/AddIns/BackendBindings/CSharpBinding/CSharpLanguageBinding.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -45,6 +45,11 @@
Debug.Assert(executionManager != null);
executionManager.Execute(project);
}
+
+ public void DebugProject (IProject project)
+ {
+ executionManager.Debug (project);
+ }
public string GetCompiledOutputName(string fileName)
{
Added: trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Commands/DebuggerCommands.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -0,0 +1,37 @@
+using System;
+
+using MonoDevelop.Services;
+
+using ICSharpCode.Core.AddIns.Codons;
+using ICSharpCode.SharpDevelop.Services;
+using ICSharpCode.Core.Services;
+
+namespace MonoDevelop.Commands
+{
+
+ public class DebugProject : AbstractMenuCommand
+ {
+
+ public override void Run ()
+ {
+
+ IProjectService projServ = (IProjectService)ServiceManager.Services.GetService (typeof (IProjectService));
+
+ if (projServ.CurrentOpenCombine != null) {
+ //try {
+ if (projServ.NeedsCompiling) {
+ projServ.CompileCombine ();
+ }
+ projServ.OnBeforeStartProject ();
+ projServ.CurrentOpenCombine.Debug ();
+ //} catch {
+ IMessageService msgServ = (IMessageService)ServiceManager.Services.GetService (typeof (IMessageService));
+ msgServ.ShowError (&quot;Can't execute the debugger&quot;);
+ //}
+ }
+
+ }
+
+ }
+
+}
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Codons/LanguageBinding/ILanguageBinding.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -32,6 +32,8 @@
/// the file was compiled by the compiler object before.
/// &lt;/summary&gt;
void Execute(string fileName);
+
+ void DebugProject (IProject project);
/// &lt;summary&gt;
/// This function executes a project, the project is given as a parameter,
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/Combine.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -408,6 +408,12 @@
StartProject(entrynum);
}
+ public void Debug ()
+ {
+ CombineEntry entry = (CombineEntry)entries[GetEntryNumber (startProject)];
+ entry.Debug ();
+ }
+
public void Execute()
{
if (singleStartup) {
Modified: trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Internal/Project/Combine/CombineEntry.cs 2004-03-03 06:29:43 UTC (rev 1085)
@@ -19,6 +19,8 @@
using ICSharpCode.SharpDevelop.Internal.Project;
using ICSharpCode.SharpDevelop.Services;
+using MonoDevelop.Services;
+
namespace ICSharpCode.SharpDevelop.Internal.Project
{
public abstract class CombineEntry : IDisposable
@@ -66,6 +68,7 @@
public abstract void Build(bool doBuildAll);
public abstract void Execute();
public abstract void Save();
+ public abstract void Debug ();
}
public class ProjectCombineEntry : CombineEntry
@@ -190,6 +193,20 @@
}
}
+
+ public override void Debug ()
+ {
+ LanguageBindingService langBindingServ = (LanguageBindingService)ICSharpCode.Core.Services.ServiceManager.Services.GetService (typeof (LanguageBindingService));
+ ILanguageBinding binding = langBindingServ.GetBindingPerLanguageName (project.ProjectType);
+ if (binding == null) {
+ Console.WriteLine (&quot;Language binding unknown&quot;);
+ return;
+ }
+ TaskService taskService = (TaskService)ICSharpCode.Core.Services.ServiceManager.Services.GetService (typeof (TaskService));
+
+ if (taskService.Errors == 0)
+ binding.DebugProject (project);
+ }
public override void Save()
{
@@ -232,5 +249,10 @@
combine.SaveCombine(System.IO.Path.GetFullPath (Filename));
combine.SaveAllProjects();
}
+
+ public override void Debug ()
+ {
+ combine.Debug ();
+ }
}
}
Modified: trunk/MonoDevelop/src/Main/Base/Makefile.am
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-03 03:39:47 UTC (rev 1084)
+++ trunk/MonoDevelop/src/Main/Base/Makefile.am 2004-03-03 06:29:43 UTC (rev 1085)
@@ -163,6 +163,7 @@
./Commands/AutostartCommands.cs \
./Commands/ToolsCommands.cs \
./Commands/MenuItemBuilders.cs \
+./Commands/DebuggerCommands.cs \
./Services/File/IFileService.cs \
./Services/File/DefaultFileService.cs \
./Services/File/FileEventArgs.cs \
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000689.html">[Monodevelop-patches-list] r1084 - in trunk/MonoDevelop: . data/resources/glade src/Main/Base/Internal/Project/Project
</A></li>
<LI>Next message: <A HREF="000691.html">[Monodevelop-patches-list] r1086 - in trunk/MonoDevelop: . src/Main/Base/Commands src/Main/Base/Gui/Dialogs
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#690">[ date ]</a>
<a href="thread.html#690">[ thread ]</a>
<a href="subject.html#690">[ subject ]</a>
<a href="author.html#690">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">More information about the Monodevelop-patches-list
mailing list</a><br>
</body></html>