diff options
Diffstat (limited to 'extras')
19 files changed, 0 insertions, 2779 deletions
diff --git a/extras/MonoDevelop.Debugger.Gdb/AssemblyInfo.cs b/extras/MonoDevelop.Debugger.Gdb/AssemblyInfo.cs deleted file mode 100644 index ad3b28e1a8..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/AssemblyInfo.cs +++ /dev/null @@ -1,9 +0,0 @@ -// Autogenerated from Manifest.addin.xml - -using System.Reflection; - -[assembly: AssemblyProduct ("MonoDevelop")] -[assembly: AssemblyTitle ("GDB support for Mono.Debugging")] -[assembly: AssemblyDescription ("GNU Debugger support for Mono.Debugging")] -[assembly: AssemblyVersion ("2.6")] -[assembly: AssemblyCopyright ("MIT X11")] diff --git a/extras/MonoDevelop.Debugger.Gdb/ChangeLog b/extras/MonoDevelop.Debugger.Gdb/ChangeLog deleted file mode 100644 index ce5286dfe1..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/ChangeLog +++ /dev/null @@ -1,365 +0,0 @@ -2010-06-14 Lluis Sanchez Gual <lluis@novell.com> - - * configure: Bump MD version. - -2010-05-20 Lluis Sanchez Gual <lluis@novell.com> - - * configure: Bump MD version. - -2010-05-20 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2010-05-07 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2010-05-03 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Increased console creation timeout. - -2010-04-28 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2010-04-19 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - - * MonoDevelop.Debugger.csproj: Flush. - -2010-03-22 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * AssemblyInfo.cs: - * Manifest.addin.xml: Bumped MD version. - -2010-03-17 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.csproj: Flush. - -2010-03-17 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.csproj: Merged MD.Projects into - MD.Core, and MD.Projects.Gui, MD.Core.Gui and MD.Components - into MD.Ide. - -2010-03-15 David Makovský <yakeen@sannyas-on.net> - - * GdbBacktrace.cs: fixes for C++ structures (thx Martin Vejnár - <avakar@ratatanek.cz>) - -2010-03-08 Jonathan Pryor <jpryor@novell.com> - - * configure: Create a $(CSC) make variable. - * MonoDevelop.Debugger.Gdb.make: Set $(ASSEMBLY_COMPILER_COMMAND) to - $(CSC). This allows a top-level CSC override to be used within this - module (e.g. top-level `make CSC=dmcs` for a v4 build). - -2010-03-03 Michael Hutchinson <mhutchinson@novell.com> - - * GdbSession.cs: Name the reader thread. - -2010-03-01 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.Gdb.sln: The invariant policy can't be - used anymore as base policy set. - -2010-02-22 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2010-02-20 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Add missing method. - -2010-02-19 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2010-02-16 Lluis Sanchez Gual <lluis@novell.com> - - * Manifest.addin.xml: - * GdbSessionFactory.cs: Track api changes. Some engine info is - now taken from extension node metadata. - - * MonoDevelop.Debugger.csproj: - * MonoDevelop.Debugger.Gdb.sln: Flush. - - * GdbSession.cs: Expressions are now printed by the debugging - service. - -2009-12-11 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2009-11-20 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs: Implement Id property. - -2009-11-18 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2009-11-12 Lluis Sanchez Gual <lluis@novell.com> - - * GdbEvent.cs: Reason can be an array. Handle this case. - - * MonoDevelop.Debugger.csproj: Flush. - - * GdbSession.cs: If there is an error while initializing, - report that the process has exited. - -2009-10-30 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * AssemblyInfo.cs: - * Manifest.addin.xml: Bump MD version. - -2009-10-18 Michael Hutchinson <mhutchinson@novell.com> - - * GdbSession.cs: Fix Pocess/Process spelling. - -2009-10-16 Michael Hutchinson <mhutchinson@novell.com> - - * GdbSessionFactory.cs: Fix spelling of GetAttachableProcesses - API. - -2009-10-07 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * AssemblyInfo.cs: - * Manifest.addin.xml: Bump MD version. - -2009-10-05 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: - * GdbBacktrace.cs: Use long for thread and process id. - -2009-10-01 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.Gdb.sln: - - * GdbSession.cs: Don't crash if a breakpoint can't be set. - -2009-08-20 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.csproj: - * MonoDevelop.Debugger.Gdb.sln: Updated. - - * GdbSession.cs: Quote file names when needed. - -2009-05-19 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.csproj: Flush. - -2009-04-27 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs: - * MonoDevelop.Debugger.csproj: - * MonoDevelop.Debugger.Gdb.make: Track api changes. - -2009-04-15 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * AssemblyInfo.cs: - * Manifest.addin.xml: Bump MD version. - -2009-03-04 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs: Removed unused CanDebugPlatform and - rename CanDebugFile to CanDebugCommand. - -2009-03-04 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs: Changed the way execution handlers - work. We are not using platform ids anymore. Instead, we use - command strings when looking for execution handlers. - IExecutionHandlerFactory has been removed and now everything - is handled by IExecutionHandler, which has a new CanExecute - method. This model is more simple and more generic. - -2009-02-26 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.Gdb.sln: Flush. - -2009-02-25 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.Debugger.Gdb.sln: Set policies. Remove unused - name attribute. - -2009-02-20 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.csproj: Updated references. - -2009/02/06 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.mdp: - * MonoDevelop.Debugger.mds: - * MonoDevelop.Debugger.csproj: - * MonoDevelop.Debugger.Gdb.mds: - * MonoDevelop.Debugger.Gdb.sln: Migrated to MSBuild file format. - -2009/02/03 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * AssemblyInfo.cs: - * Manifest.addin.xml: Bump MD version. - -2009-01-26 Michael Hutchinson <mhutchinson@novell.com> - - * MonoDevelop.Debugger.mdp: Flush project format changes. - -2008-12-19 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.mdp: Updated. - - * GdbBacktrace.cs: Track api changes. - -2008-12-09 Levi Bard <taktaktaktaktaktaktaktaktaktak@gmail.com> - - * GdbSession.cs: Fallback to relative source file path. - -2008-12-04 Lluis Sanchez Gual <lluis@novell.com> - - * Manifest.addin.xml: Set correct add-in category. - - * GdbSession.cs: - * GdbSessionFactory.cs: - * MonoDevelop.Debugger.mdp: Track api changes. - -2008-12-02 Michael Hutchinson <mhutchinson@novell.com> - - * Manifest.addin.xml: Change addin version number to match - configure/tarball version number. - -2008-12-02 Michael Hutchinson <mhutchinson@novell.com> - - * AssemblyInfo.cs: Add AssemblyInfo.cs files that are autogenerated from - the addin manifests. - -2008-12-02 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.mdp: - * MonoDevelop.Debugger.Gdb.make: Remove .pc file. It's not required. - -2008-11-25 Lluis Sanchez Gual <lluis@novell.com> - - * Manifest.addin.xml: Track api changes. - -2008-11-05 Lluis Sanchez Gual <lluis@novell.com> - - * configure: - * Manifest.addin.xml: Bump MD version. - -2008-10-16 Michael Hutchinson <mhutchinson@novell.com> - - * configure: Fix tarball name. - -2008-09-26 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs, GdbSession.cs: When debugging a mono process, try to - get managed method names for unknown stack frames. - -2008-09-17 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.mdp: Updated projects. - -2008-09-03 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2008-08-22 Lluis Sanchez Gual <lluis@novell.com> - - * Manifest.addin.xml, MonoDevelop.Debugger.mdp: Extension point - location has changed. - -2008-08-18 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.mdp: Fix reference to Mono.TextEditor. The - incorrect add-in version number causes problems in the makefile - synchronization. - -2008-08-07 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Implemented support for conditions, trace expressions - and hit counts. - -2008-08-05 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2008-07-25 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Implement GetAllLocals. - -2008-07-16 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2008-07-11 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs: Fix construction process command line string. - * GdbSession.cs: Track api changes. - -2008-07-09 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.Gdb.make: Install the assemblies to the correct - directory. - -2008-07-09 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2008-07-09 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Added support for code completion. - -2008-07-09 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - * GdbSession.cs: Clean temporary variables. - -2008-07-07 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Track api changes. - -2008-07-02 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs: Support modifying variable values. - * GdbSession.cs: Implemented support for disassembling files. - -2008-07-01 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Track api changes. - -2008-06-26 Lluis Sanchez Gual <lluis@novell.com> - - * GdbBacktrace.cs, GdbSession.cs: Allow setting the active thread. - Implemented GetThreads and GetProcesses. - * ResultData.cs: Handle weird case where a tuple can have several - values for a property. - -2008-06-20 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSession.cs: Implemented detach. - -2008-06-20 Lluis Sanchez Gual <lluis@novell.com> - - * GdbSessionFactory.cs, GdbBacktrace.cs, GdbSession.cs, ResultData.cs: - Implemented process attaching, variable query, disassemble. - -2008-06-17 Lluis Sanchez Gual <lluis@novell.com> - - * MonoDevelop.Debugger.Gdb.make, configure, MonoDevelop.Debugger.mdp, - MonoDevelop.Debugger.mds, Makefile.include, rules.make, - monodevelop.debugger.gdb.pc.in, Makefile: Added missing build - files. - -2008-06-17 Lluis Sanchez Gual <lluis@novell.com> - - * AssemblyInfo.cs, GdbBacktrace.cs, GdbEvent.cs, GdbSession.cs, - CommandStatus.cs, GdbSessionFactory.cs, ResultData.cs, - GdbCommandResult.cs, Manifest.addin.xml: Initial support for gdb - integration. - diff --git a/extras/MonoDevelop.Debugger.Gdb/CommandStatus.cs b/extras/MonoDevelop.Debugger.Gdb/CommandStatus.cs deleted file mode 100644 index 683c304cbe..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/CommandStatus.cs +++ /dev/null @@ -1,38 +0,0 @@ -// CommandStatus.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; - -namespace MonoDevelop.Debugger.Gdb -{ - enum CommandStatus - { - Done, - Running, - Error - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs b/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs deleted file mode 100644 index 7aec2df3d0..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/GdbBacktrace.cs +++ /dev/null @@ -1,400 +0,0 @@ -// GdbBacktrace.cs -// -// Authors: Lluis Sanchez Gual <lluis@novell.com> -// Jeffrey Stedfast <jeff@xamarin.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// Copyright (c) 2012 Xamarin Inc. (http://www.xamarin.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; -using System.Collections.Generic; -using System.Globalization; -using Mono.Debugging.Client; -using Mono.Debugging.Backend; - -namespace MonoDevelop.Debugger.Gdb -{ - class GdbBacktrace: IBacktrace, IObjectValueSource - { - int fcount; - StackFrame firstFrame; - GdbSession session; - DissassemblyBuffer[] disBuffers; - int currentFrame = -1; - long threadId; - - public GdbBacktrace (GdbSession session, long threadId, int count, ResultData firstFrame) - { - fcount = count; - this.threadId = threadId; - if (firstFrame != null) - this.firstFrame = CreateFrame (firstFrame); - this.session = session; - } - - public int FrameCount { - get { - return fcount; - } - } - - public StackFrame[] GetStackFrames (int firstIndex, int lastIndex) - { - List<StackFrame> frames = new List<StackFrame> (); - if (firstIndex == 0 && firstFrame != null) { - frames.Add (firstFrame); - firstIndex++; - } - - if (lastIndex >= fcount) - lastIndex = fcount - 1; - - if (firstIndex > lastIndex) - return frames.ToArray (); - - session.SelectThread (threadId); - GdbCommandResult res = session.RunCommand ("-stack-list-frames", firstIndex.ToString (), lastIndex.ToString ()); - ResultData stack = res.GetObject ("stack"); - for (int n=0; n<stack.Count; n++) { - ResultData frd = stack.GetObject (n); - frames.Add (CreateFrame (frd.GetObject ("frame"))); - } - return frames.ToArray (); - } - - public ObjectValue[] GetLocalVariables (int frameIndex, EvaluationOptions options) - { - List<ObjectValue> values = new List<ObjectValue> (); - SelectFrame (frameIndex); - - GdbCommandResult res = session.RunCommand ("-stack-list-locals", "0"); - foreach (ResultData data in res.GetObject ("locals")) - values.Add (CreateVarObject (data.GetValue ("name"))); - - return values.ToArray (); - } - - public ObjectValue[] GetParameters (int frameIndex, EvaluationOptions options) - { - List<ObjectValue> values = new List<ObjectValue> (); - SelectFrame (frameIndex); - GdbCommandResult res = session.RunCommand ("-stack-list-arguments", "0", frameIndex.ToString (), frameIndex.ToString ()); - foreach (ResultData data in res.GetObject ("stack-args").GetObject (0).GetObject ("frame").GetObject ("args")) - values.Add (CreateVarObject (data.GetValue ("name"))); - - return values.ToArray (); - } - - public ObjectValue GetThisReference (int frameIndex, EvaluationOptions options) - { - return null; - } - - public ObjectValue[] GetAllLocals (int frameIndex, EvaluationOptions options) - { - List<ObjectValue> locals = new List<ObjectValue> (); - locals.AddRange (GetParameters (frameIndex, options)); - locals.AddRange (GetLocalVariables (frameIndex, options)); - return locals.ToArray (); - } - - public ObjectValue[] GetExpressionValues (int frameIndex, string[] expressions, EvaluationOptions options) - { - List<ObjectValue> values = new List<ObjectValue> (); - SelectFrame (frameIndex); - foreach (string exp in expressions) - values.Add (CreateVarObject (exp)); - return values.ToArray (); - } - - public ExceptionInfo GetException (int frameIndex, EvaluationOptions options) - { - return null; - } - - public ValidationResult ValidateExpression (int frameIndex, string expression, EvaluationOptions options) - { - return new ValidationResult (true, null); - } - - public CompletionData GetExpressionCompletionData (int frameIndex, string exp) - { - SelectFrame (frameIndex); - - bool pointer = exp.EndsWith ("->"); - int i; - - if (pointer || exp.EndsWith (".")) { - exp = exp.Substring (0, exp.Length - (pointer ? 2 : 1)); - i = 0; - while (i < exp.Length) { - ObjectValue val = CreateVarObject (exp); - if (!val.IsUnknown && !val.IsError) { - CompletionData data = new CompletionData (); - foreach (ObjectValue cv in val.GetAllChildren ()) - data.Items.Add (new CompletionItem (cv.Name, cv.Flags)); - data.ExpressionLength = 0; - return data; - } - i++; - } - return null; - } - - i = exp.Length - 1; - bool lastWastLetter = false; - while (i >= 0) { - char c = exp [i--]; - if (!char.IsLetterOrDigit (c) && c != '_') - break; - lastWastLetter = !char.IsDigit (c); - } - - if (lastWastLetter) { - string partialWord = exp.Substring (i+1); - - CompletionData cdata = new CompletionData (); - cdata.ExpressionLength = partialWord.Length; - - // Local variables - - GdbCommandResult res = session.RunCommand ("-stack-list-locals", "0"); - foreach (ResultData data in res.GetObject ("locals")) { - string name = data.GetValue ("name"); - if (name.StartsWith (partialWord)) - cdata.Items.Add (new CompletionItem (name, ObjectValueFlags.Variable)); - } - - // Parameters - - res = session.RunCommand ("-stack-list-arguments", "0", frameIndex.ToString (), frameIndex.ToString ()); - foreach (ResultData data in res.GetObject ("stack-args").GetObject (0).GetObject ("frame").GetObject ("args")) { - string name = data.GetValue ("name"); - if (name.StartsWith (partialWord)) - cdata.Items.Add (new CompletionItem (name, ObjectValueFlags.Parameter)); - } - - if (cdata.Items.Count > 0) - return cdata; - } - return null; - } - - - ObjectValue CreateVarObject (string exp) - { - try { - session.SelectThread (threadId); - exp = exp.Replace ("\"", "\\\""); - GdbCommandResult res = session.RunCommand ("-var-create", "-", "*", "\"" + exp + "\""); - string vname = res.GetValue ("name"); - session.RegisterTempVariableObject (vname); - return CreateObjectValue (exp, res); - } catch { - return ObjectValue.CreateUnknown (exp); - } - } - - ObjectValue CreateObjectValue (string name, ResultData data) - { - string vname = data.GetValue ("name"); - string typeName = data.GetValue ("type"); - string value = data.GetValue ("value"); - int nchild = data.GetInt ("numchild"); - - ObjectValue val; - ObjectValueFlags flags = ObjectValueFlags.Variable; - - // There can be 'public' et al children for C++ structures - if (typeName == null) - typeName = "none"; - - if (typeName.EndsWith ("]")) { - val = ObjectValue.CreateArray (this, new ObjectPath (vname), typeName, nchild, flags, null); - } else if (value == "{...}" || typeName.EndsWith ("*") || nchild > 0) { - val = ObjectValue.CreateObject (this, new ObjectPath (vname), typeName, value, flags, null); - } else { - val = ObjectValue.CreatePrimitive (this, new ObjectPath (vname), typeName, new EvaluationResult (value), flags); - } - val.Name = name; - return val; - } - - public ObjectValue[] GetChildren (ObjectPath path, int index, int count, EvaluationOptions options) - { - List<ObjectValue> children = new List<ObjectValue> (); - session.SelectThread (threadId); - GdbCommandResult res = session.RunCommand ("-var-list-children", "2", path.Join (".")); - ResultData cdata = res.GetObject ("children"); - - // The response may not contain the "children" list at all. - if (cdata == null) - return children.ToArray (); - - if (index == -1) { - index = 0; - count = cdata.Count; - } - - for (int n=index; n<cdata.Count && n<index+count; n++) { - ResultData data = cdata.GetObject (n); - ResultData child = data.GetObject ("child"); - - string name = child.GetValue ("exp"); - if (name.Length > 0 && char.IsNumber (name [0])) - name = "[" + name + "]"; - - // C++ structures may contain typeless children named - // "public", "private" and "protected". - if (child.GetValue("type") == null) { - ObjectPath childPath = new ObjectPath (child.GetValue ("name").Split ('.')); - ObjectValue[] subchildren = GetChildren (childPath, -1, -1, options); - children.AddRange(subchildren); - } else { - ObjectValue val = CreateObjectValue (name, child); - children.Add (val); - } - } - return children.ToArray (); - } - - public EvaluationResult SetValue (ObjectPath path, string value, EvaluationOptions options) - { - session.SelectThread (threadId); - session.RunCommand ("-var-assign", path.Join ("."), value); - return new EvaluationResult (value); - } - - public ObjectValue GetValue (ObjectPath path, EvaluationOptions options) - { - throw new NotSupportedException (); - } - - void SelectFrame (int frame) - { - session.SelectThread (threadId); - if (frame != currentFrame) { - session.RunCommand ("-stack-select-frame", frame.ToString ()); - currentFrame = frame; - } - } - - StackFrame CreateFrame (ResultData frameData) - { - string lang = "Native"; - string func = frameData.GetValue ("func"); - string sadr = frameData.GetValue ("addr"); - - if (func == "??" && session.IsMonoProcess) { - // Try to get the managed func name - try { - ResultData data = session.RunCommand ("-data-evaluate-expression", "mono_pmip(" + sadr + ")"); - string val = data.GetValue ("value"); - if (val != null) { - int i = val.IndexOf ('"'); - if (i != -1) { - func = val.Substring (i).Trim ('"',' '); - lang = "Mono"; - } - } - } catch { - } - } - - int line = -1; - string sline = frameData.GetValue ("line"); - if (sline != null) - line = int.Parse (sline); - - string sfile = frameData.GetValue ("fullname"); - if (sfile == null) - sfile = frameData.GetValue ("file"); - if (sfile == null) - sfile = frameData.GetValue ("from"); - SourceLocation loc = new SourceLocation (func ?? "?", sfile, line); - - long addr; - if (!string.IsNullOrEmpty (sadr)) - addr = long.Parse (sadr.Substring (2), NumberStyles.HexNumber); - else - addr = 0; - - return new StackFrame (addr, loc, lang); - } - - public AssemblyLine[] Disassemble (int frameIndex, int firstLine, int count) - { - SelectFrame (frameIndex); - if (disBuffers == null) - disBuffers = new DissassemblyBuffer [fcount]; - - DissassemblyBuffer buffer = disBuffers [frameIndex]; - if (buffer == null) { - ResultData data = session.RunCommand ("-stack-info-frame"); - long addr = long.Parse (data.GetObject ("frame").GetValue ("addr").Substring (2), NumberStyles.HexNumber); - buffer = new GdbDissassemblyBuffer (session, addr); - disBuffers [frameIndex] = buffer; - } - - return buffer.GetLines (firstLine, firstLine + count - 1); - } - - public object GetRawValue (ObjectPath path, EvaluationOptions options) - { - return null; - } - - public void SetRawValue (ObjectPath path, object value, EvaluationOptions options) - { - } - } - - class GdbDissassemblyBuffer: DissassemblyBuffer - { - GdbSession session; - - public GdbDissassemblyBuffer (GdbSession session, long addr): base (addr) - { - this.session = session; - } - - public override AssemblyLine[] GetLines (long startAddr, long endAddr) - { - try { - ResultData data = session.RunCommand ("-data-disassemble", "-s", startAddr.ToString (), "-e", endAddr.ToString (), "--", "0"); - ResultData ins = data.GetObject ("asm_insns"); - - AssemblyLine[] alines = new AssemblyLine [ins.Count]; - for (int n=0; n<ins.Count; n++) { - ResultData aline = ins.GetObject (n); - long addr = long.Parse (aline.GetValue ("address").Substring (2), NumberStyles.HexNumber); - AssemblyLine line = new AssemblyLine (addr, aline.GetValue ("inst")); - alines [n] = line; - } - return alines; - } catch { - return new AssemblyLine [0]; - } - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbCommandResult.cs b/extras/MonoDevelop.Debugger.Gdb/GdbCommandResult.cs deleted file mode 100644 index a8790d74ad..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/GdbCommandResult.cs +++ /dev/null @@ -1,53 +0,0 @@ -// GdbCommandResult.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; - -namespace MonoDevelop.Debugger.Gdb -{ - class GdbCommandResult: ResultData - { - public CommandStatus Status; - public string ErrorMessage; - - public GdbCommandResult (string line) - { - if (line.StartsWith ("^done")) { - Status = CommandStatus.Done; - ReadResults (line, 6); - } else if (line.StartsWith ("^error")) { - Status = CommandStatus.Error; - if (line.Length > 7) { - ReadResults (line, 7); - ErrorMessage = GetValue ("msg"); - } - } else if (line.StartsWith ("^running")) { - Status = CommandStatus.Running; - } - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbEvent.cs b/extras/MonoDevelop.Debugger.Gdb/GdbEvent.cs deleted file mode 100644 index cf631cfb70..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/GdbEvent.cs +++ /dev/null @@ -1,49 +0,0 @@ -// GdbEvent.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; - -namespace MonoDevelop.Debugger.Gdb -{ - class GdbEvent: ResultData - { - public string Name; - public string Reason; - - public GdbEvent (string line) - { - int i = line.IndexOf (','); - if (i == -1) - i = line.Length; - Name = line.Substring (1, i - 1); - ReadResults (line, i+1); - object[] reasons = GetAllValues ("reason"); - if (reasons.Length > 0) - Reason = (string) reasons [0]; - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs b/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs deleted file mode 100644 index c585ab86b5..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/GdbSession.cs +++ /dev/null @@ -1,730 +0,0 @@ -// GdbSession.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; -using System.Globalization; -using System.Text; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using Mono.Debugging.Client; -using MonoDevelop.Core; -using MonoDevelop.Core.Execution; -using Mono.Unix.Native; - -namespace MonoDevelop.Debugger.Gdb -{ - class GdbSession: DebuggerSession - { - Process proc; - StreamReader sout; - StreamWriter sin; - IProcessAsyncOperation console; - GdbCommandResult lastResult; - bool running; - Thread thread; - long currentThread = -1; - long activeThread = -1; - bool isMonoProcess; - string currentProcessName; - List<string> tempVariableObjects = new List<string> (); - Dictionary<int,BreakEventInfo> breakpoints = new Dictionary<int,BreakEventInfo> (); - List<BreakEventInfo> breakpointsWithHitCount = new List<BreakEventInfo> (); - - DateTime lastBreakEventUpdate = DateTime.Now; - Dictionary<int, WaitCallback> breakUpdates = new Dictionary<int,WaitCallback> (); - bool breakUpdateEventsQueued; - const int BreakEventUpdateNotifyDelay = 500; - - bool internalStop; - bool logGdb; - - object syncLock = new object (); - object eventLock = new object (); - object gdbLock = new object (); - - public GdbSession () - { - logGdb = !string.IsNullOrEmpty (Environment.GetEnvironmentVariable ("MONODEVELOP_GDB_LOG")); - } - - protected override void OnRun (DebuggerStartInfo startInfo) - { - lock (gdbLock) { - // Create a script to be run in a terminal - string script = Path.GetTempFileName (); - string ttyfile = Path.GetTempFileName (); - string ttyfileDone = ttyfile + "_done"; - string tty; - - try { - File.WriteAllText (script, "tty > " + ttyfile + "\ntouch " + ttyfileDone + "\nsleep 10000d"); - Mono.Unix.Native.Syscall.chmod (script, FilePermissions.ALLPERMS); - - console = Runtime.ProcessService.StartConsoleProcess (script, "", ".", ExternalConsoleFactory.Instance.CreateConsole (true), null); - DateTime tim = DateTime.Now; - while (!File.Exists (ttyfileDone)) { - System.Threading.Thread.Sleep (100); - if ((DateTime.Now - tim).TotalSeconds > 10) - throw new InvalidOperationException ("Console could not be created."); - } - tty = File.ReadAllText (ttyfile).Trim (' ','\n'); - } finally { - try { - if (File.Exists (script)) - File.Delete (script); - if (File.Exists (ttyfile)) - File.Delete (ttyfile); - if (File.Exists (ttyfileDone)) - File.Delete (ttyfileDone); - } catch { - // Ignore - } - } - - StartGdb (); - - // Initialize the terminal - RunCommand ("-inferior-tty-set", Escape (tty)); - - try { - RunCommand ("-file-exec-and-symbols", Escape (startInfo.Command)); - } catch { - FireTargetEvent (TargetEventType.TargetExited, null); - throw; - } - - RunCommand ("-environment-cd", Escape (startInfo.WorkingDirectory)); - - // Set inferior arguments - if (!string.IsNullOrEmpty (startInfo.Arguments)) - RunCommand ("-exec-arguments", startInfo.Arguments); - - currentProcessName = startInfo.Command + " " + startInfo.Arguments; - - CheckIsMonoProcess (); - OnStarted (); - - RunCommand ("-exec-run"); - } - } - - protected override void OnAttachToProcess (long processId) - { - lock (gdbLock) { - StartGdb (); - currentProcessName = "PID " + processId.ToString (); - RunCommand ("attach", processId.ToString ()); - currentThread = activeThread = 1; - CheckIsMonoProcess (); - OnStarted (); - FireTargetEvent (TargetEventType.TargetStopped, null); - } - } - - public bool IsMonoProcess { - get { return isMonoProcess; } - } - - void CheckIsMonoProcess () - { - try { - RunCommand ("-data-evaluate-expression", "mono_pmip"); - isMonoProcess = true; - } catch { - isMonoProcess = false; - // Ignore - } - } - - void StartGdb () - { - proc = new Process (); - proc.StartInfo.FileName = "gdb"; - proc.StartInfo.Arguments = "-quiet -fullname -i=mi2"; - proc.StartInfo.UseShellExecute = false; - proc.StartInfo.RedirectStandardInput = true; - proc.StartInfo.RedirectStandardOutput = true; - proc.StartInfo.RedirectStandardError = true; - proc.Start (); - - sout = proc.StandardOutput; - sin = proc.StandardInput; - - thread = new Thread (OutputInterpreter); - thread.Name = "GDB output interpeter"; - thread.IsBackground = true; - thread.Start (); - } - - public override void Dispose () - { - if (console != null && !console.IsCompleted) { - console.Cancel (); - console = null; - } - - if (thread != null) - thread.Abort (); - } - - protected override void OnSetActiveThread (long processId, long threadId) - { - activeThread = threadId; - } - - protected override void OnStop () - { - Syscall.kill (proc.Id, Signum.SIGINT); - } - - protected override void OnDetach () - { - lock (gdbLock) { - InternalStop (); - RunCommand ("detach"); - FireTargetEvent (TargetEventType.TargetExited, null); - } - } - - protected override void OnExit () - { - lock (gdbLock) { - InternalStop (); - RunCommand ("kill"); - TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetExited); - OnTargetEvent (args); -/* proc.Kill (); - TargetEventArgs args = new TargetEventArgs (TargetEventType.TargetExited); - OnTargetEvent (args); -*/ } - } - - protected override void OnStepLine () - { - SelectThread (activeThread); - RunCommand ("-exec-step"); - } - - protected override void OnNextLine () - { - SelectThread (activeThread); - RunCommand ("-exec-next"); - } - - protected override void OnStepInstruction () - { - SelectThread (activeThread); - RunCommand ("-exec-step-instruction"); - } - - protected override void OnNextInstruction () - { - SelectThread (activeThread); - RunCommand ("-exec-next-instruction"); - } - - protected override void OnFinish () - { - SelectThread (activeThread); - GdbCommandResult res = RunCommand ("-stack-info-depth", "2"); - if (res.GetValue ("depth") == "1") { - RunCommand ("-exec-continue"); - } else { - RunCommand ("-stack-select-frame", "0"); - RunCommand ("-exec-finish"); - } - } - - protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be) - { - Breakpoint bp = be as Breakpoint; - if (bp == null) - throw new NotSupportedException (); - - BreakEventInfo bi = new BreakEventInfo (); - - lock (gdbLock) { - bool dres = InternalStop (); - try { - string extraCmd = string.Empty; - if (bp.HitCount > 0) { - extraCmd += "-i " + bp.HitCount; - breakpointsWithHitCount.Add (bi); - } - if (!string.IsNullOrEmpty (bp.ConditionExpression)) { - if (!bp.BreakIfConditionChanges) - extraCmd += " -c " + bp.ConditionExpression; - } - - GdbCommandResult res = null; - string errorMsg = null; - - if (bp is FunctionBreakpoint) { - try { - res = RunCommand ("-break-insert", extraCmd.Trim (), ((FunctionBreakpoint) bp).FunctionName); - } catch (Exception ex) { - errorMsg = ex.Message; - } - } else { - // Breakpoint locations must be double-quoted if files contain spaces. - // For example: -break-insert "\"C:/Documents and Settings/foo.c\":17" - RunCommand ("-environment-directory", Escape (Path.GetDirectoryName (bp.FileName))); - - try { - res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (bp.FileName) + ":" + bp.Line)); - } catch (Exception ex) { - errorMsg = ex.Message; - } - - if (res == null) { - try { - res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (Path.GetFileName (bp.FileName)) + ":" + bp.Line)); - } - catch { - // Ignore - } - } - } - - if (res == null) { - bi.SetStatus (BreakEventStatus.Invalid, errorMsg); - return bi; - } - int bh = res.GetObject ("bkpt").GetInt ("number"); - if (!be.Enabled) - RunCommand ("-break-disable", bh.ToString ()); - breakpoints [bh] = bi; - bi.Handle = bh; - bi.SetStatus (BreakEventStatus.Bound, null); - return bi; - } finally { - InternalResume (dres); - } - } - } - - bool CheckBreakpoint (int handle) - { - BreakEventInfo binfo; - if (!breakpoints.TryGetValue (handle, out binfo)) - return true; - - Breakpoint bp = (Breakpoint) binfo.BreakEvent; - - if (!string.IsNullOrEmpty (bp.ConditionExpression) && bp.BreakIfConditionChanges) { - // Update the condition expression - GdbCommandResult res = RunCommand ("-data-evaluate-expression", Escape (bp.ConditionExpression)); - string val = res.GetValue ("value"); - RunCommand ("-break-condition", handle.ToString (), "(" + bp.ConditionExpression + ") != " + val); - } - - if (!string.IsNullOrEmpty (bp.TraceExpression) && bp.HitAction == HitAction.PrintExpression) { - GdbCommandResult res = RunCommand ("-data-evaluate-expression", Escape (bp.TraceExpression)); - string val = res.GetValue ("value"); - NotifyBreakEventUpdate (binfo, 0, val); - return false; - } - return true; - } - - void NotifyBreakEventUpdate (BreakEventInfo binfo, int hitCount, string lastTrace) - { - bool notify = false; - - WaitCallback nc = delegate { - if (hitCount != -1) - binfo.IncrementHitCount (); - if (lastTrace != null) - binfo.UpdateLastTraceValue (lastTrace); - }; - - lock (breakUpdates) - { - int span = (int) (DateTime.Now - lastBreakEventUpdate).TotalMilliseconds; - if (span >= BreakEventUpdateNotifyDelay && !breakUpdateEventsQueued) { - // Last update was more than 0.5s ago. The update can be sent. - lastBreakEventUpdate = DateTime.Now; - notify = true; - } else { - // Queue the event notifications to avoid wasting too much time - breakUpdates [(int)binfo.Handle] = nc; - if (!breakUpdateEventsQueued) { - breakUpdateEventsQueued = true; - - ThreadPool.QueueUserWorkItem (delegate { - Thread.Sleep (BreakEventUpdateNotifyDelay - span); - List<WaitCallback> copy; - lock (breakUpdates) { - copy = new List<WaitCallback> (breakUpdates.Values); - breakUpdates.Clear (); - breakUpdateEventsQueued = false; - lastBreakEventUpdate = DateTime.Now; - } - foreach (WaitCallback wc in copy) - wc (null); - }); - } - } - } - if (notify) - nc (null); - } - - void UpdateHitCountData () - { - foreach (BreakEventInfo bp in breakpointsWithHitCount) { - GdbCommandResult res = RunCommand ("-break-info", bp.Handle.ToString ()); - string val = res.GetObject ("BreakpointTable").GetObject ("body").GetObject (0).GetObject ("bkpt").GetValue ("ignore"); - if (val != null) - NotifyBreakEventUpdate (bp, int.Parse (val), null); - else - NotifyBreakEventUpdate (bp, 0, null); - } - breakpointsWithHitCount.Clear (); - } - - protected override void OnRemoveBreakEvent (BreakEventInfo binfo) - { - lock (gdbLock) { - if (binfo.Handle == null) - return; - bool dres = InternalStop (); - breakpointsWithHitCount.Remove (binfo); - breakpoints.Remove ((int)binfo.Handle); - try { - RunCommand ("-break-delete", binfo.Handle.ToString ()); - } finally { - InternalResume (dres); - } - } - } - - protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable) - { - lock (gdbLock) { - if (binfo.Handle == null) - return; - bool dres = InternalStop (); - try { - if (enable) - RunCommand ("-break-enable", binfo.Handle.ToString ()); - else - RunCommand ("-break-disable", binfo.Handle.ToString ()); - } finally { - InternalResume (dres); - } - } - } - - protected override void OnUpdateBreakEvent (BreakEventInfo binfo) - { - Breakpoint bp = binfo.BreakEvent as Breakpoint; - if (bp == null) - throw new NotSupportedException (); - - if (binfo.Handle == null) - return; - - bool ss = InternalStop (); - - try { - if (bp.HitCount > 0) { - RunCommand ("-break-after", binfo.Handle.ToString (), bp.HitCount.ToString ()); - breakpointsWithHitCount.Add (binfo); - } else - breakpointsWithHitCount.Remove (binfo); - - if (!string.IsNullOrEmpty (bp.ConditionExpression) && !bp.BreakIfConditionChanges) - RunCommand ("-break-condition", binfo.Handle.ToString (), bp.ConditionExpression); - else - RunCommand ("-break-condition", binfo.Handle.ToString ()); - } finally { - InternalResume (ss); - } - } - - protected override void OnContinue () - { - SelectThread (activeThread); - RunCommand ("-exec-continue"); - } - - protected override ThreadInfo[] OnGetThreads (long processId) - { - List<ThreadInfo> list = new List<ThreadInfo> (); - ResultData data = RunCommand ("-thread-list-ids").GetObject ("thread-ids"); - foreach (string id in data.GetAllValues ("thread-id")) - list.Add (GetThread (long.Parse (id))); - return list.ToArray (); - } - - protected override ProcessInfo[] OnGetProcesses () - { - ProcessInfo p = new ProcessInfo (0, currentProcessName); - return new ProcessInfo [] { p }; - } - - ThreadInfo GetThread (long id) - { - return new ThreadInfo (0, id, "Thread #" + id, null); - } - - protected override Backtrace OnGetThreadBacktrace (long processId, long threadId) - { - ResultData data = SelectThread (threadId); - GdbCommandResult res = RunCommand ("-stack-info-depth"); - int fcount = int.Parse (res.GetValue ("depth")); - GdbBacktrace bt = new GdbBacktrace (this, threadId, fcount, data != null ? data.GetObject ("frame") : null); - return new Backtrace (bt); - } - - protected override AssemblyLine[] OnDisassembleFile (string file) - { - List<AssemblyLine> lines = new List<AssemblyLine> (); - int cline = 1; - do { - ResultData data = null; - try { - data = RunCommand ("-data-disassemble", "-f", file, "-l", cline.ToString (), "--", "1"); - } catch { - break; - } - ResultData asm_insns = data.GetObject ("asm_insns"); - int newLine = cline; - for (int n=0; n<asm_insns.Count; n++) { - ResultData src_and_asm_line = asm_insns.GetObject (n).GetObject ("src_and_asm_line"); - newLine = src_and_asm_line.GetInt ("line"); - ResultData line_asm_insn = src_and_asm_line.GetObject ("line_asm_insn"); - for (int i=0; i<line_asm_insn.Count; i++) { - ResultData asm = line_asm_insn.GetObject (i); - long addr = long.Parse (asm.GetValue ("address").Substring (2), NumberStyles.HexNumber); - string code = asm.GetValue ("inst"); - lines.Add (new AssemblyLine (addr, code, newLine)); - } - } - if (newLine <= cline) - break; - cline = newLine + 1; - - } while (true); - - return lines.ToArray (); - } - - public ResultData SelectThread (long id) - { - if (id == currentThread) - return null; - currentThread = id; - return RunCommand ("-thread-select", id.ToString ()); - } - - string Escape (string str) - { - if (str == null) - return null; - else if (str.IndexOf (' ') != -1 || str.IndexOf ('"') != -1) { - str = str.Replace ("\"", "\\\""); - return "\"" + str + "\""; - } - else - return str; - } - - public GdbCommandResult RunCommand (string command, params string[] args) - { - lock (gdbLock) { - lock (syncLock) { - lastResult = null; - - lock (eventLock) { - running = true; - } - - if (logGdb) - Console.WriteLine ("gdb<: " + command + " " + string.Join (" ", args)); - - sin.WriteLine (command + " " + string.Join (" ", args)); - - if (!Monitor.Wait (syncLock, 4000)) - throw new InvalidOperationException ("Command execution timeout."); - if (lastResult.Status == CommandStatus.Error) - throw new InvalidOperationException (lastResult.ErrorMessage); - return lastResult; - } - } - } - - bool InternalStop () - { - lock (eventLock) { - if (!running) - return false; - internalStop = true; - Syscall.kill (proc.Id, Signum.SIGINT); - if (!Monitor.Wait (eventLock, 4000)) - throw new InvalidOperationException ("Target could not be interrupted."); - } - return true; - } - - void InternalResume (bool resume) - { - if (resume) - RunCommand ("-exec-continue"); - } - - void OutputInterpreter () - { - string line; - while ((line = sout.ReadLine ()) != null) { - try { - ProcessOutput (line); - } catch (Exception ex) { - Console.WriteLine (ex); - } - } - } - - void ProcessOutput (string line) - { - if (logGdb) - Console.WriteLine ("dbg>: '" + line + "'"); - switch (line [0]) { - case '^': - lock (syncLock) { - lastResult = new GdbCommandResult (line); - running = (lastResult.Status == CommandStatus.Running); - Monitor.PulseAll (syncLock); - } - break; - - case '~': - case '&': - if (line.Length > 1 && line[1] == '"') - line = line.Substring (2, line.Length - 5); - ThreadPool.QueueUserWorkItem (delegate { - OnTargetOutput (false, line + "\n"); - }); - break; - - case '*': - GdbEvent ev; - lock (eventLock) { - running = false; - ev = new GdbEvent (line); - string ti = ev.GetValue ("thread-id"); - if (ti != null && ti != "all") - currentThread = activeThread = int.Parse (ti); - Monitor.PulseAll (eventLock); - if (internalStop) { - internalStop = false; - return; - } - } - ThreadPool.QueueUserWorkItem (delegate { - try { - HandleEvent (ev); - } catch (Exception ex) { - Console.WriteLine (ex); - } - }); - break; - } - } - - void HandleEvent (GdbEvent ev) - { - if (ev.Name != "stopped") { - Console.WriteLine ("Unknown event: " + ev.Name); - return; - } - - CleanTempVariableObjects (); - - TargetEventType type; - switch (ev.Reason) { - case "breakpoint-hit": - type = TargetEventType.TargetHitBreakpoint; - if (!CheckBreakpoint (ev.GetInt ("bkptno"))) { - RunCommand ("-exec-continue"); - return; - } - break; - case "signal-received": - if (ev.GetValue ("signal-name") == "SIGINT") - type = TargetEventType.TargetInterrupted; - else - type = TargetEventType.TargetSignaled; - break; - case "exited": - case "exited-signalled": - case "exited-normally": - type = TargetEventType.TargetExited; - break; - default: - type = TargetEventType.TargetStopped; - break; - } - - ResultData curFrame = ev.GetObject ("frame"); - FireTargetEvent (type, curFrame); - } - - void FireTargetEvent (TargetEventType type, ResultData curFrame) - { - UpdateHitCountData (); - - TargetEventArgs args = new TargetEventArgs (type); - - if (type != TargetEventType.TargetExited) { - GdbCommandResult res = RunCommand ("-stack-info-depth"); - int fcount = int.Parse (res.GetValue ("depth")); - - GdbBacktrace bt = new GdbBacktrace (this, activeThread, fcount, curFrame); - args.Backtrace = new Backtrace (bt); - args.Thread = GetThread (activeThread); - } - OnTargetEvent (args); - } - - internal void RegisterTempVariableObject (string var) - { - tempVariableObjects.Add (var); - } - - void CleanTempVariableObjects () - { - foreach (string s in tempVariableObjects) - RunCommand ("-var-delete", s); - tempVariableObjects.Clear (); - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/GdbSessionFactory.cs b/extras/MonoDevelop.Debugger.Gdb/GdbSessionFactory.cs deleted file mode 100644 index a4e11b6877..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/GdbSessionFactory.cs +++ /dev/null @@ -1,151 +0,0 @@ -// GdbSessionFactory.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; -using System.Collections.Generic; -using System.IO; -using Mono.Debugging.Client; -using Mono.Debugging.Backend; -using MonoDevelop.Core.Execution; - -namespace MonoDevelop.Debugger.Gdb -{ - public class GdbSessionFactory: IDebuggerEngine - { - struct FileData { - public DateTime LastCheck; - public bool IsExe; - } - - Dictionary<string,FileData> fileCheckCache = new Dictionary<string, FileData> (); - - public bool CanDebugCommand (ExecutionCommand command) - { - NativeExecutionCommand cmd = command as NativeExecutionCommand; - if (cmd == null) - return false; - - string file = FindFile (cmd.Command); - if (!File.Exists (file)) { - // The provided file is not guaranteed to exist. If it doesn't - // we assume we can execute it because otherwise the run command - // in the IDE will be disabled, and that's not good because that - // command will build the project if the exec doesn't yet exist. - return true; - } - - file = Path.GetFullPath (file); - DateTime currentTime = File.GetLastWriteTime (file); - - FileData data; - if (fileCheckCache.TryGetValue (file, out data)) { - if (data.LastCheck == currentTime) - return data.IsExe; - } - data.LastCheck = currentTime; - try { - data.IsExe = IsExecutable (file); - } catch { - data.IsExe = false; - } - fileCheckCache [file] = data; - return data.IsExe; - } - - public DebuggerStartInfo CreateDebuggerStartInfo (ExecutionCommand command) - { - NativeExecutionCommand pec = (NativeExecutionCommand) command; - DebuggerStartInfo startInfo = new DebuggerStartInfo (); - startInfo.Command = pec.Command; - startInfo.Arguments = pec.Arguments; - startInfo.WorkingDirectory = pec.WorkingDirectory; - if (pec.EnvironmentVariables.Count > 0) { - foreach (KeyValuePair<string,string> val in pec.EnvironmentVariables) - startInfo.EnvironmentVariables [val.Key] = val.Value; - } - return startInfo; - } - - public bool IsExecutable (string file) - { - // HACK: this is a quick but not very reliable way of checking if a file - // is a native executable. Actually, we are interested in checking that - // the file is not a script. - using (StreamReader sr = new StreamReader (file)) { - char[] chars = new char[3]; - int n = 0, nr = 0; - while (n < chars.Length && (nr = sr.ReadBlock (chars, n, chars.Length - n)) != 0) - n += nr; - if (nr != chars.Length) - return true; - if (chars [0] == '#' && chars [1] == '!') - return false; - } - return true; - } - - public DebuggerSession CreateSession () - { - GdbSession ds = new GdbSession (); - return ds; - } - - public ProcessInfo[] GetAttachableProcesses () - { - List<ProcessInfo> procs = new List<ProcessInfo> (); - foreach (string dir in Directory.GetDirectories ("/proc")) { - int id; - if (!int.TryParse (Path.GetFileName (dir), out id)) - continue; - try { - File.ReadAllText (Path.Combine (dir, "sessionid")); - } catch { - continue; - } - string cmdline = File.ReadAllText (Path.Combine (dir, "cmdline")); - cmdline = cmdline.Replace ('\0',' '); - ProcessInfo pi = new ProcessInfo (id, cmdline); - procs.Add (pi); - } - return procs.ToArray (); - } - - string FindFile (string cmd) - { - if (Path.IsPathRooted (cmd)) - return cmd; - string pathVar = Environment.GetEnvironmentVariable ("PATH"); - string[] paths = pathVar.Split (Path.PathSeparator); - foreach (string path in paths) { - string file = Path.Combine (path, cmd); - if (File.Exists (file)) - return file; - } - return cmd; - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/Makefile b/extras/MonoDevelop.Debugger.Gdb/Makefile deleted file mode 100644 index 507faafa08..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/Makefile +++ /dev/null @@ -1,73 +0,0 @@ - -EXTRA_DIST = MonoDevelop.Debugger.Gdb.make rules.make configure Makefile.include monodevelop-debugger-gdb.spec.in - -all: all-recursive - -top_srcdir=. -include $(top_srcdir)/config.make -include $(top_srcdir)/Makefile.include -include $(top_srcdir)/rules.make - -#include $(top_srcdir)/custom-hooks.make - -#Warning: This is an automatically generated file, do not edit! -ifeq ($(CONFIG),DEBUG) - SUBDIRS = . -endif -ifeq ($(CONFIG),RELEASE) - SUBDIRS = . -endif - -# Include project specific makefile -include MonoDevelop.Debugger.Gdb.make - -CONFIG_MAKE=$(top_srcdir)/config.make - -%-recursive: $(CONFIG_MAKE) - @set . $$MAKEFLAGS; final_exit=:; \ - case $$2 in --unix) shift ;; esac; \ - case $$2 in *=*) dk="exit 1" ;; *k*) dk=: ;; *) dk="exit 1" ;; esac; \ - make pre-$*-hook prefix=$(prefix) ; \ - for dir in $(call quote_each,$(SUBDIRS)); do \ - case "$$dir" in \ - .) make $*-local || { final_exit="exit 1"; $$dk; };;\ - *) (cd "$$dir" && make $*) || { final_exit="exit 1"; $$dk; };;\ - esac \ - done; \ - make post-$*-hook prefix=$(prefix) ; \ - $$final_exit - -$(CONFIG_MAKE): - echo "You must run configure first" - exit 1 - -clean: clean-recursive -install: install-recursive -uninstall: uninstall-recursive - -dist: $(CONFIG_MAKE) - rm -rf $(PACKAGE)-$(VERSION) - mkdir $(PACKAGE)-$(VERSION) - make pre-dist-hook distdir=$$distdir - for dir in $(call quote_each,$(SUBDIRS)); do \ - pkgdir=`pwd`/$(PACKAGE)-$(VERSION); \ - mkdir "$$pkgdir/$$dir" || true; \ - case $$dir in \ - .) make dist-local "distdir=$$pkgdir" || exit 1;; \ - *) (cd "$$dir"; make dist-local "distdir=$$pkgdir/$$dir") || exit 1;; \ - esac \ - done - (make dist-local distdir=$(PACKAGE)-$(VERSION)) - make post-dist-hook "distsir=$$distdir" - tar czvf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) - rm -rf $(PACKAGE)-$(VERSION) - @echo "==========================================" - @echo "$(PACKAGE)-$(VERSION) has been packaged > $(PACKAGE)-$(VERSION).tar.gz" - @echo "==========================================" - -distcheck: dist - (mkdir test; cd test; \ - tar xzvf ../$(PACKAGE)-$(VERSION).tar.gz; cd $(PACKAGE)-$(VERSION); \ - ./configure --prefix=$$(cd `pwd`/..; pwd); \ - make && make install && make dist); - rm -rf test diff --git a/extras/MonoDevelop.Debugger.Gdb/Makefile.include b/extras/MonoDevelop.Debugger.Gdb/Makefile.include deleted file mode 100644 index 7e13b91f9f..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/Makefile.include +++ /dev/null @@ -1,110 +0,0 @@ -VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT - -s2q=$(subst \ ,?,$1) -q2s=$(subst ?,\ ,$1) -# use this when result will be quoted -unesc2=$(subst ?, ,$1) - -build_sources = $(FILES) $(GENERATED_FILES) -build_sources_esc= $(call s2q,$(build_sources)) -# use unesc2, as build_sources_embed is quoted -build_sources_embed= $(call unesc2,$(build_sources_esc:%='$(srcdir)/%')) - -comma__=, -get_resource_name = $(firstword $(subst $(comma__), ,$1)) -get_culture = $(lastword $(subst ., ,$(basename $1))) -is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1))))) - -RESOURCES_ESC=$(call s2q,$(RESOURCES)) - -build_resx_list = $(foreach res, $(RESOURCES_ESC), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),)) -build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) -build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES_ESC)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res))) -build_others_list = $(build_non_culture_others_list) -build_xamlg_list = $(filter %.xaml.g.cs, $(FILES)) - -# resgen all .resx resources -build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res))) -build_resx_resources_esc = $(build_resx_files:.resx=.resources) -build_resx_resources = $(call q2s,$(build_resx_resources_esc)) - -# embed resources for the main assembly -build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list)) -# use unesc2, as build_resx_resources_embed is quoted -build_resx_resources_embed = $(call unesc2,$(build_resx_resources_hack:%='-resource:%')) -build_others_files = $(call q2s,$(foreach res, $(build_others_list),$(call get_resource_name,$(res)))) -build_others_resources = $(build_others_files) -# use unesc2, as build_others_resources_embed is quoted -build_others_resources_embed = $(call unesc2,$(build_others_list:%='-resource:$(srcdir)/%')) - -build_resources = $(build_resx_resources) $(build_others_resources) -build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed) - -# -usesourcepath is available only for resgen2 -emit_resgen_target_1=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); cd '$$(shell dirname '$$<')' && $$(RESGEN) '$$(shell basename '$$<')' '$$(shell basename '$$@')' -emit_resgen_target_2=$(call q2s,$1) : $(call q2s,$(subst .resources,.resx,$1)); $$(RESGEN) -usesourcepath '$$<' '$$@' - -emit_resgen_target=$(if $(filter resgen2,$(RESGEN)),$(emit_resgen_target_2),$(emit_resgen_target_1)) -emit_resgen_targets=$(foreach res,$(build_resx_resources_esc),$(eval $(call emit_resgen_target,$(res)))) - -build_references_ref = $(call q2s,$(foreach ref, $(call s2q,$(REFERENCES)), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))) -build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(DLL_REFERENCES)), -r:$(ref))) -build_references_ref += $(call q2s,$(foreach ref, $(call s2q,$(PROJECT_REFERENCES)), -r:$(ref))) - -s2q2s=$(call unesc2,$(call s2q,$1)) -cp_actual=test -z $1 || cp $1 $2 -cp=$(call cp_actual,'$(call s2q2s,$1)','$(call s2q2s,$2)') - -rm_actual=test -z '$1' || rm -f '$2' -rm=$(call rm_actual,$(call s2q2s,$1),$(call s2q2s,$2)/$(shell basename '$(call s2q2s,$1)')) - -EXTRA_DIST += $(build_sources) $(build_resx_files) $(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES) $(build_culture_res_files) -CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) $(build_resx_resources) $(build_satellite_assembly_list) -DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/* - -pkglib_SCRIPTS = $(ASSEMBLY) -bin_SCRIPTS = $(BINARIES) - -programfilesdir = @libdir@/@PACKAGE@ -programfiles_DATA = $(PROGRAMFILES) -linuxpkgconfigdir = @libdir@/pkgconfig -linuxpkgconfig_DATA = $(LINUX_PKGCONFIG) - - -# macros - -# $(call emit-deploy-target,deploy-variable-name) -define emit-deploy-target -$($1): $($1_SOURCE) - mkdir -p '$$(shell dirname '$$@')' - cp '$$<' '$$@' -endef - -# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x) -# assumes that for a wrapper foo.pc its source template is foo.pc.in -# if $3 is non-empty then wrapper is marked exec -define emit-deploy-wrapper -$($1): $2 $(top_srcdir)/config.make - mkdir -p '$$(shell dirname '$$@')' - cp '$$<' '$$@' - $(if $3,chmod +x '$$@') - -$2: $2.in $(top_srcdir)/config.make - sed -e "s,@prefix@,$(prefix)," -e "s,@PACKAGE@,$(PACKAGE)," -e "s,@expanded_libdir@,$(libdir)," -e "s,@expanded_bindir@,$(bindir)," -e "s,@expanded_datadir@,$(datadir)," < $2.in > $2 -endef - -# generating satellite assemblies - -culture_resources = $(foreach res, $(RESOURCES_ESC), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res))) -cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res))))) -culture_resource_dependencies = $(call q2s,$(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)) -culture_resource_commandlines = $(call unesc2,cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)') -build_satellite_assembly_list = $(call q2s,$(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))) -build_culture_res_files = $(call q2s,$(foreach res, $(culture_resources),$(call get_resource_name,$(res)))) - -$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res)))))) -$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res))))) - -$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME): - mkdir -p '$(@D)' - $(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
\ No newline at end of file diff --git a/extras/MonoDevelop.Debugger.Gdb/Manifest.addin.xml b/extras/MonoDevelop.Debugger.Gdb/Manifest.addin.xml deleted file mode 100644 index 890f675723..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/Manifest.addin.xml +++ /dev/null @@ -1,23 +0,0 @@ -<Addin id = "Mono.Debugging.Gdb" - name = "GDB support for Mono.Debugging" - author = "Lluis Sanchez" - url = "http://www.mono-project.com" - description = "GNU Debugger support for Mono.Debugging" - copyright = "MIT X11" - category = "Debugging" - version = "5.0"> - - <Dependencies> - <Addin id="MonoDevelop.Core" version="5.0"/> - <Addin id="MonoDevelop.Ide" version="5.0"/> - <Addin id="MonoDevelop.Debugger" version="5.0"/> - </Dependencies> - - <Extension path="/MonoDevelop/Debugging/DebuggerEngines"> - <DebuggerEngine id="Mono.Debugger.Gdb" - name="GNU Debugger (GDB)" - features="ConditionalBreakpoints, Tracepoints, Catchpoints, Attaching, DebugFile, Stepping, Pause, Breakpoints, Disassembly" - type="MonoDevelop.Debugger.Gdb.GdbSessionFactory" /> - </Extension> - -</Addin> diff --git a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.make b/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.make deleted file mode 100644 index fd552c0793..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.make +++ /dev/null @@ -1,103 +0,0 @@ - - -# Warning: This is an automatically generated file, do not edit! - -srcdir=. -top_srcdir=. - -include $(top_srcdir)/config.make - -ifeq ($(CONFIG),DEBUG) -ASSEMBLY_COMPILER_COMMAND = $(CSC) -ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -debug "-define:DEBUG" - -ASSEMBLY = build/MonoDevelop.Debugger.Gdb.dll -ASSEMBLY_MDB = $(ASSEMBLY).mdb -COMPILE_TARGET = library -PROJECT_REFERENCES = -BUILD_DIR = build - -MONODEVELOP_DEBUGGER_GDB_DLL_MDB_SOURCE=build/MonoDevelop.Debugger.Gdb.dll.mdb -MONODEVELOP_DEBUGGER_GDB_DLL_MDB=$(BUILD_DIR)/MonoDevelop.Debugger.Gdb.dll.mdb - -endif - -ifeq ($(CONFIG),RELEASE) -ASSEMBLY_COMPILER_COMMAND = $(CSC) -ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize- -ASSEMBLY = build/MonoDevelop.Debugger.Gdb.dll -ASSEMBLY_MDB = -COMPILE_TARGET = library -PROJECT_REFERENCES = -BUILD_DIR = build - -MONODEVELOP_DEBUGGER_GDB_DLL_MDB= - -endif - -AL=al2 -SATELLITE_ASSEMBLY_NAME=.resources.dll - -PROGRAMFILES = \ - $(MONODEVELOP_DEBUGGER_GDB_DLL_MDB) - -RESGEN=resgen2 - -FILES = \ - AssemblyInfo.cs \ - CommandStatus.cs \ - GdbBacktrace.cs \ - GdbCommandResult.cs \ - GdbEvent.cs \ - GdbSession.cs \ - GdbSessionFactory.cs \ - ResultData.cs - -DATA_FILES = - -RESOURCES = Manifest.addin.xml - -REFERENCES = \ - Mono.Posix \ - -pkg:monodevelop \ - -pkg:monodevelop-core-addins \ - System - -DLL_REFERENCES = - -CLEANFILES = $(PROGRAMFILES) $(LINUX_PKGCONFIG) - -#Targets -all-local: $(ASSEMBLY) $(PROGRAMFILES) $(LINUX_PKGCONFIG) $(top_srcdir)/config.make - -$(eval $(call emit_resgen_targets)) -$(build_xamlg_list): %.xaml.g.cs: %.xaml - xamlg '$<' - -INSTALL_DIR = $(DESTDIR)$(prefix)/lib/monodevelop/AddIns/MonoDevelop.Debugger - -LOCAL_PKGCONFIG=PKG_CONFIG_PATH=../../local-config:$$PKG_CONFIG_PATH - -$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list) - make pre-all-local-hook prefix=$(prefix) - mkdir -p $(shell dirname $(ASSEMBLY)) - make $(CONFIG)_BeforeBuild - $(LOCAL_PKGCONFIG) $(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref) - make $(CONFIG)_AfterBuild - make post-all-local-hook prefix=$(prefix) - -install-local: $(ASSEMBLY) $(ASSEMBLY_MDB) - make pre-install-local-hook prefix=$(prefix) - mkdir -p '$(INSTALL_DIR)' - $(call cp,$(ASSEMBLY),$(INSTALL_DIR)) - $(call cp,$(ASSEMBLY_MDB),$(INSTALL_DIR)) - $(call cp,$(MONODEVELOP_DEBUGGER_GDB_DLL_MDB),$(INSTALL_DIR)) - mkdir -p '$(DESTDIR)$(libdir)/pkgconfig' - make post-install-local-hook prefix=$(prefix) - -uninstall-local: $(ASSEMBLY) $(ASSEMBLY_MDB) - make pre-uninstall-local-hook prefix=$(prefix) - $(call rm,$(ASSEMBLY),$(INSTALL_DIR)) - $(call rm,$(ASSEMBLY_MDB),$(INSTALL_DIR)) - $(call rm,$(MONODEVELOP_DEBUGGER_GDB_DLL_MDB),$(INSTALL_DIR)) - make post-uninstall-local-hook prefix=$(prefix) diff --git a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.sln b/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.sln deleted file mode 100644 index 6cbbd77629..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.Gdb.sln +++ /dev/null @@ -1,38 +0,0 @@ -
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Debugger", "MonoDevelop.Debugger.csproj", "{FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = MonoDevelop.Debugger.csproj
- Policies = $0
- $0.DotNetNamingPolicy = $1
- $1.DirectoryNamespaceAssociation = Flat
- $1.ResourceNamePolicy = FileName
- $0.StandardHeader = $2
- $2.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) ${Year} ${CopyrightHolder}\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.
- $2.IncludeInNewFiles = True
- $0.TextStylePolicy = $3
- $3.FileWidth = 120
- $3.TabWidth = 4
- $3.inheritsSet = Mono
- $3.inheritsScope = text/plain
- $0.VersionControlPolicy = $4
- $4.inheritsSet = Mono
- $0.ChangeLogPolicy = $5
- $5.UpdateMode = None
- $5.VcsIntegration = None
- $5.inheritsSet = Mono
- EndGlobalSection
-EndGlobal
diff --git a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.csproj b/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.csproj deleted file mode 100644 index 8b039bce98..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/MonoDevelop.Debugger.csproj +++ /dev/null @@ -1,142 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>9.0.21022</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{FA15FC26-A7E7-4932-93B7-65FAE6D5DD33}</ProjectGuid> - <OutputType>Library</OutputType> - <AssemblyName>MonoDevelop.Debugger.Gdb</AssemblyName> - <RootNamespace>MonoDevelop.Debugger</RootNamespace> - <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>build</OutputPath> - <DefineConstants>DEBUG</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ConsolePause>false</ConsolePause> - <Execution> - <Execution clr-version="Net_2_0" /> - </Execution> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>none</DebugType> - <Optimize>false</Optimize> - <OutputPath>build</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <ConsolePause>false</ConsolePause> - <Execution> - <Execution clr-version="Net_2_0" /> - </Execution> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="MonoDevelop.Core, Version=1.9.2.0, Culture=neutral"> - <SpecificVersion>False</SpecificVersion> - <Package>monodevelop</Package> - </Reference> - <Reference Include="MonoDevelop.Ide, Version=1.9.2.0, Culture=neutral"> - <SpecificVersion>False</SpecificVersion> - <Package>monodevelop</Package> - </Reference> - <Reference Include="NRefactory, Version=0.0.0.0, Culture=neutral"> - <Package>monodevelop</Package> - </Reference> - <Reference Include="Mono.TextEditor, Version=1.0.0.0, Culture=neutral"> - <Package>monodevelop</Package> - </Reference> - <Reference Include="Mono.Posix" /> - <Reference Include="Mono.Cecil, Version=0.6.8.8607, Culture=neutral"> - <Package>monodevelop</Package> - </Reference> - <Reference Include="MonoDevelop.VersionControl, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.NUnit, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.XmlEditor, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.AspNet, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Gettext, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Deployment, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Deployment.Linux, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.GtkCore, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.DesignerSupport, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.VBNetBinding, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.CBinding, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.CSharpBinding, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Autotools, Version=2.0.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.SourceEditor2, Version=2.1.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Debugger, Version=2.1.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Refactoring, Version=2.1.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="MonoDevelop.Debugger.Soft, Version=2.2.0.0, Culture=neutral"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="Mono.Debugging, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f"> - <Package>monodevelop</Package> - </Reference> - <Reference Include="Mono.Debugging.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=5e9ce85b0923c84f"> - <Package>monodevelop-core-addins</Package> - </Reference> - <Reference Include="Mono.Debugger.Soft, Version=0.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756"> - <Package>monodevelop-core-addins</Package> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="AssemblyInfo.cs" /> - <Compile Include="GdbSession.cs" /> - <Compile Include="GdbSessionFactory.cs" /> - <Compile Include="GdbBacktrace.cs" /> - <Compile Include="CommandStatus.cs" /> - <Compile Include="ResultData.cs" /> - <Compile Include="GdbEvent.cs" /> - <Compile Include="GdbCommandResult.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Manifest.addin.xml"> - <LogicalName>Manifest.addin.xml</LogicalName> - </EmbeddedResource> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <ProjectExtensions> - <MonoDevelop> - <Properties> - <Deployment.LinuxDeployData generatePcFile="false" /> - </Properties> - </MonoDevelop> - </ProjectExtensions> -</Project> diff --git a/extras/MonoDevelop.Debugger.Gdb/ResultData.cs b/extras/MonoDevelop.Debugger.Gdb/ResultData.cs deleted file mode 100644 index 73c5612a6c..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/ResultData.cs +++ /dev/null @@ -1,229 +0,0 @@ -// ResultData.cs -// -// Author: -// Lluis Sanchez Gual <lluis@novell.com> -// -// Copyright (c) 2008 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// -// - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text; -using Mono.Debugging.Client; -using Mono.Debugging.Backend; - -namespace MonoDevelop.Debugger.Gdb -{ - class ResultData: IEnumerable - { - Hashtable props; - object[] array; - bool isArrayProperty; - - public int Count { - get { - if (array != null) - return array.Length; - else if (props != null) - return props.Count; - else - return 0; - } - } - - public string GetValue (string name) - { - return (string) props [name]; - } - - public int GetInt (string name) - { - return int.Parse (GetValue (name)); - } - - public string GetValue (int index) - { - return (string) array [index]; - } - - public ResultData GetObject (string name) - { - return (ResultData) props [name]; - } - - public ResultData GetObject (int index) - { - return (ResultData) array [index]; - } - - public object[] GetAllValues (string name) - { - object ob = props [name]; - if (ob == null) - return new object [0]; - ResultData rd = ob as ResultData; - if (rd != null && rd.isArrayProperty) - return rd.array; - else - return new object[] { ob }; - } - - protected void ReadResults (string str, int pos) - { - ReadTuple (str, ref pos, this); - } - - void ReadResult (string str, ref int pos, out string name, out object value) - { - name = null; - value = null; - - name = ReadString (str, '=', ref pos); - ReadChar (str, ref pos, '='); - value = ReadValue (str, ref pos); - } - - string ReadString (string str, char term, ref int pos) - { - StringBuilder sb = new StringBuilder (); - while (pos < str.Length && str [pos] != term) { - if (str [pos] == '\\') { - pos++; - if (pos >= str.Length) - break; - } - sb.Append (str [pos]); - pos++; - } - return sb.ToString (); - } - - object ReadValue (string str, ref int pos) - { - if (str [pos] == '"') { - pos++; - string ret = ReadString (str, '"', ref pos); - pos++; - return ret; - } - if (str [pos] == '{') { - pos++; - ResultData data = new ResultData (); - ReadTuple (str, ref pos, data); - return data; - } - if (str [pos] == '[') { - pos++; - return ReadArray (str, ref pos); - } - - // Single value tuple - string name; - object val; - ReadResult (str, ref pos, out name, out val); - ResultData sdata = new ResultData (); - sdata.props = new Hashtable (); - sdata.props [name] = val; - return sdata; - } - - void ReadTuple (string str, ref int pos, ResultData data) - { - if (data.props == null) - data.props = new Hashtable (); - - while (pos < str.Length && str [pos] != '}') { - string name; - object val; - ReadResult (str, ref pos, out name, out val); - if (data.props.ContainsKey (name)) { - object ob = data.props [name]; - ResultData rd = ob as ResultData; - if (rd != null && rd.isArrayProperty) { - object[] newArr = new object [rd.array.Length + 1]; - Array.Copy (rd.array, newArr, rd.array.Length); - newArr [rd.array.Length] = val; - rd.array = newArr; - } else { - rd = new ResultData (); - rd.isArrayProperty = true; - rd.array = new object [2]; - rd.array [0] = ob; - rd.array [1] = val; - data.props [name] = rd; - } - } else { - data.props [name] = val; - } - TryReadChar (str, ref pos, ','); - } - TryReadChar (str, ref pos, '}'); - } - - ResultData ReadArray (string str, ref int pos) - { - ArrayList list = new ArrayList (); - while (pos < str.Length && str [pos] != ']') { - object val = ReadValue (str, ref pos); - list.Add (val); - TryReadChar (str, ref pos, ','); - } - TryReadChar (str, ref pos, ']'); - ResultData arr = new ResultData (); - arr.array = list.ToArray (); - return arr; - } - - void ReadChar (string str, ref int pos, char c) - { - if (!TryReadChar (str, ref pos, c)) - ThrownParseError (str, pos); - } - - bool TryReadChar (string str, ref int pos, char c) - { - if (pos >= str.Length || str [pos] != c) - return false; - pos++; - return true; - } - - void ThrownParseError (string str, int pos) - { - if (pos > str.Length) - pos = str.Length; - str = str.Insert (pos, "[!]"); - throw new InvalidOperationException ("Error parsing result: " + str); - } - - public IEnumerator GetEnumerator () - { - if (props != null) - return props.Values.GetEnumerator (); - else if (array != null) - return array.GetEnumerator (); - else - return new object[0].GetEnumerator (); - } - } -} diff --git a/extras/MonoDevelop.Debugger.Gdb/configure b/extras/MonoDevelop.Debugger.Gdb/configure deleted file mode 100755 index da78492d3e..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/configure +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env bash -VERSION=5.0 -PACKAGE=monodevelop-debugger-gdb -prefix=/usr/local -config=DEBUG -configurations=" RELEASE DEBUG" -common_packages=" monodevelop;5.0" - - -usage () -{ - echo "Usage : configure [OPTION]... [--config=CONFIG]" - echo - echo "Options:" - echo " --prefix=PREFIX install architecture-independent files in PREFIX" - echo " [/usr/local]" - echo " --bindir=DIR user executables [PREFIX/bin]" - echo " --datadir=DIR read-only architecture-independent data [PREFIX/share]" - echo " --libdir=DIR object code libraries [PREFIX/lib]" - echo - echo "Configurations available :" - for c in $configurations; do - if [ "$c" = "$config" ]; then - echo " $c (Default)" - else - echo " $c" - fi - done -} - -validate_config () -{ - test -z "$1" && return 0 - for c in $configurations; do - if [ "$c" = "$1" ]; then - return 1 - fi - done - return 0 -} - -check_package () -{ - name=`echo $1 | cut -d\; -f1` - version=`echo $1 | cut -d\; -f2` - - echo -n "Checking for package '$name'.." | tee -a config.log - pkg-config --atleast-version=$version $name - if [ $? -ne 0 ]; then - echo " ERROR: Package named '$name' >= $version not found." | tee -a config.log - echo "Try adjusting your PKG_CONFIG_PATH environment variable." | tee -a config.log - return 1 - fi - echo " found." | tee -a config.log -} - -check_required_packages () -{ - echo "Looking for required packages" | tee config.log - var=required_packages_$config - for pkg in $common_packages ${!var}; do - check_package $pkg - retval=$? - [ $retval -ne 0 ] && return $retval - done - return 0 -} - -while test x$1 != x; do - case $1 in - --prefix=*) - prefix=`echo $1 | sed 's/--prefix=//'` - ;; - --prefix) - shift - prefix=$1 - ;; - --libdir=*) - libdir=`echo $1 | sed 's/--libdir=//'` - ;; - --libdir) - shift - libdir=$1 - ;; - --bindir=*) - bindir=`echo $1 | sed 's/--bindir=//'` - ;; - --bindir) - shift - bindir=$1 - ;; - --datadir=*) - datadir=`echo $1 | sed 's/--datadir=//'` - ;; - --datadir) - shift - datadir=$1 - ;; - --config=*) - conf=`echo $1 | sed 's/--config=//'` - validate_config "$conf" - if [ $? -eq 1 ]; then - config=$conf - else - echo "Invalid config name - $conf" - usage - exit 1 - fi - ;; - --help) - usage - exit - ;; - *) - echo Unknown argument $1 >&2 - usage - exit 1 - ;; - esac - shift -done - -check_required_packages -[ $? -eq 1 ] && exit 1 - -if [ -z "$libdir" ]; then - libdir=$prefix/lib -fi -if [ -z "$bindir" ]; then - bindir=$prefix/bin -fi -if [ -z "$datadir" ]; then - datadir=$prefix/share -fi - -sed -e "s,@VERSION@,$VERSION," < monodevelop-debugger-gdb.spec.in > monodevelop-debugger-gdb.spec - -echo "prefix=$prefix" > config.make -echo "libdir=$libdir" >> config.make -echo "bindir=$bindir" >> config.make -echo "datadir=$datadir" >> config.make -echo "RUNTIME=mono" >> config.make -echo "ASSEMBLY_VERSION=$VERSION.0.0" >> config.make -echo "VERSION=$VERSION" >> config.make -echo "PACKAGE=$PACKAGE" >> config.make -echo "CONFIG=$config" >> config.make -echo "CSC=dmcs" >> config.make - -echo -echo "$PACKAGE has been configured with " -echo " prefix = $prefix" -if [ "$libdir" != "$prefix/lib" ]; then - echo " libdir = $libdir" -fi -if [ "$bindir" != "$prefix/bin" ]; then - echo " bindir = $bindir" -fi -if [ "$datadir" != "$prefix/share" ]; then - echo " datadir = $datadir" -fi -echo " config = $config" -echo diff --git a/extras/MonoDevelop.Debugger.Gdb/monodevelop-debugger-gdb.spec.in b/extras/MonoDevelop.Debugger.Gdb/monodevelop-debugger-gdb.spec.in deleted file mode 100644 index 7f8e603dca..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/monodevelop-debugger-gdb.spec.in +++ /dev/null @@ -1,56 +0,0 @@ -# -# spec file for package monodevelop-debugger-gdb -# -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - - - -Name: monodevelop-debugger-gdb -Version: @VERSION@ -Release: 1 -License: MIT/X11 -AutoReqProv: on -BuildArch: noarch -Url: http://www.monodevelop.com -Source: %{name}-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: mono-devel monodevelop >= %{version} -Requires: gdb -Summary: GDB for MonoDevelop -Group: Development/Tools - -%description -GDB Debugger Addin for MonoDevelop. - -%files -%defattr(-, root, root) -%{_prefix}/lib/monodevelop/AddIns/MonoDevelop.Debugger/MonoDevelop.Debugger.Gdb.dll* - -%prep -%setup -q - -%build -%{?env_options} -./configure --prefix=%_prefix -make - -%install -%{?env_options} -make install DESTDIR=%{buildroot} - -%clean -rm -rf %{buildroot} - -%changelog diff --git a/extras/MonoDevelop.Debugger.Gdb/monodevelop.debugger.gdb.pc.in b/extras/MonoDevelop.Debugger.Gdb/monodevelop.debugger.gdb.pc.in deleted file mode 100644 index 898c689d75..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/monodevelop.debugger.gdb.pc.in +++ /dev/null @@ -1,6 +0,0 @@ -Name: MonoDevelop.Debugger.Gdb -Description: MonoDevelop.Debugger.Gdb -Version: - -Requires: -Libs: -r:@expanded_libdir@/@PACKAGE@/MonoDevelop.Debugger.Gdb.dll diff --git a/extras/MonoDevelop.Debugger.Gdb/rules.make b/extras/MonoDevelop.Debugger.Gdb/rules.make deleted file mode 100644 index a4f37a1fd1..0000000000 --- a/extras/MonoDevelop.Debugger.Gdb/rules.make +++ /dev/null @@ -1,42 +0,0 @@ -clean-local: - make pre-clean-local-hook - make $(CONFIG)_BeforeClean - -rm -f $(call quote_each,$(CLEANFILES)) - make $(CONFIG)_AfterClean - make post-clean-local-hook - -install-local: -uninstall-local: - -q2quote = '$(subst ?, ,$1)' -quote_each = $(foreach f,$(call s2q,$1),$(call q2quote,$f)) - -dist-local: - make pre-dist-local-hook "distdir=$$distdir" - for f in Makefile $(call quote_each,$(EXTRA_DIST)); do \ - d=`dirname "$$f"`; \ - test -d "$(distdir)/$$d" || \ - mkdir -p "$(distdir)/$$d"; \ - cp -p "$$f" "$(distdir)/$$d" || exit 1; \ - done - make post-dist-local-hook "distdir=$$distdir" - -dist-local-recursive: - for dir in $(call quote_each,$(SUBDIRS)); do \ - mkdir -p "$(distdir)/$$dir" || true; \ - case "$$dir" in \ - .) make dist-local "distdir=$(distdir)" || exit 1;; \ - *) (cd "$$dir"; make dist-local "distdir=$(distdir)/$$dir") || exit 1; \ - esac \ - done - -#hooks: Available hooks - all, clean, install, uninstall and dist -# and their *-local variants -pre-%-hook: ; @: -post-%-hook: ; @: - -#targets for custom commands -%_BeforeBuild: ; @: -%_AfterBuild: ; @: -%_BeforeClean: ; @: -%_AfterClean: ; @: |