~ubuntu-branches/ubuntu/wily/monodevelop/wily

« back to all changes in this revision

Viewing changes to src/addins/MonoDevelop.Debugger.Soft/MonoDevelop.Debugger.Soft/SoftDebuggerEngine.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (10.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20100202113959-n3u848nfj35yyd03
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
                
119
119
                public List<AssemblyName> UserAssemblyNames { get; private set; }
120
120
                
 
121
                internal string LogMessage { get; private set; }
 
122
                
121
123
                public void SetUserAssemblies (IList<string> files)
122
124
                {
123
 
                        UserAssemblyNames = GetAssemblyNames (files);
 
125
                        string error;
 
126
                        UserAssemblyNames = GetAssemblyNames (files, out error);
 
127
                        LogMessage = error;
124
128
                }
125
129
                
126
 
                internal static List<AssemblyName> GetAssemblyNames (IList<string> files)
 
130
                internal static List<AssemblyName> GetAssemblyNames (IList<string> files, out string error)
127
131
                {
 
132
                        error = null;
128
133
                        if (files == null || files.Count == 0)
129
134
                                return null;
130
135
                        
131
136
                        var names = new List<AssemblyName> ();
132
137
                        foreach (var file in files) {
 
138
                                if (!File.Exists (file)) {
 
139
                                        error = GettextCatalog.GetString ("User assembly '{0}' is missing. " +
 
140
                                                "Debugger will now debug all code, not just user code.", file);
 
141
                                        return null;
 
142
                                }
133
143
                                try {
134
144
                                        var asm = Mono.Cecil.AssemblyFactory.GetAssemblyManifest (file);
135
145
                                        if (string.IsNullOrEmpty (asm.Name.Name))
136
146
                                                throw new InvalidOperationException ("Assembly has no assembly name");
137
147
                                        names.Add (new AssemblyName (asm.Name.FullName));
138
148
                                } catch (Exception ex) {
139
 
                                        LoggingService.LogError ("Soft debug addin error getting assembly name for user assembly '" + file
140
 
                                                                 + "'. Debugger will now debug all code, not just user code.", ex);
 
149
                                        error = GettextCatalog.GetString ("Could not get assembly name for user assembly '{0}'. " +
 
150
                                                "Debugger will now debug all code, not just user code.", file);
 
151
                                        LoggingService.LogError ("Error getting assembly name for user assembly '" + file + "'", ex);
141
152
                                        return null;
142
153
                                }
143
154
                        }