Ejemplo n.º 1
0
        void MarkAssembly( AssemblyMirror a )
        {
            var asmname = a.GetName();
            var name = asmname.FullName;
            if ( loadedAssemblies.Contains( name ) ) return;
            bool loadAll = false;
            if ( assemblyMatchers.Contains( asmname.Name ) ) loadAll = true;

            var afile = a.Location;
            Log ("load assembly {0} from {1}", name, afile);

            if ( File.Exists( afile ) ){
                Log ("inspecting {0} for types", afile );
                try {
                    var asm = System.Reflection.Assembly.ReflectionOnlyLoadFrom( afile );
                    loadedAssemblies.Add( name );
                    if ( asm != null ){
                        Log ("loaded {0}", afile);
                        foreach ( var t in asm.GetTypes() )
                        {
                            if ( loadAll || MatchType( t ) ) 
                            {
                                Log ("matched type {0}", t.FullName);
                                MarkLoadedType( a, t );
                            }
                        }
                    }
                } catch ( System.Reflection.ReflectionTypeLoadException ) {
                    Log ("warning: could not load types from {0}", afile );
                    loadedAssemblies.Add( name ); // don't try again
                } finally {

                }

            } else {
                Log ("assembly file {0} missing", afile);
            }

        }
Ejemplo n.º 2
0
        private void ProcessLoadedAssembly(Mono.Debugger.Soft.AssemblyMirror assembly)
        {
            var hasDebugSymbols = HasDebugSymbols(assembly);

            Trace("AssemblyLoad: {0}", assembly.GetName().FullName);
            Trace("\tHasDebugSymbols: {0}", hasDebugSymbols);

            if (!hasDebugSymbols || !IsUserCode(assembly))
            {
                return;
            }

            _loadedAssemblies.Add(assembly);

            var wasEnabled = _methodEntryRequest.Enabled;

            _methodEntryRequest.Disable();
            _methodEntryRequest.AssemblyFilter = _loadedAssemblies;
            if (wasEnabled)
            {
                _methodEntryRequest.Enable();
            }
        }
Ejemplo n.º 3
0
		bool UpdateAssemblyFilters (AssemblyMirror asm)
		{
			var name = asm.GetName ().FullName;
			if (userAssemblyNames != null) {
				//HACK: not sure how else to handle xsp-compiled pages
				if (name.StartsWith ("App_")) {
					assemblyFilters.Add (asm);
					return true;
				}
			
				foreach (var n in userAssemblyNames) {
					if (n == name) {
						assemblyFilters.Add (asm);
						return true;
					}
				}
			}
			return false;
		}
Ejemplo n.º 4
0
 private static bool IsUserCode(Mono.Debugger.Soft.AssemblyMirror assembly)
 {
     return(assembly.GetName().Name.StartsWith("SdbAssemblyMirror-"));
 }
Ejemplo n.º 5
0
		bool UpdateAssemblyFilters (AssemblyMirror asm)
		{
			var name = asm.GetName ().FullName;
			bool found = false;
			if (userAssemblyNames != null) {
				//HACK: not sure how else to handle xsp-compiled pages
				if (name.StartsWith ("App_")) {
					found = true;
				} else {
					foreach (var n in userAssemblyNames) {
						if (n == name) {
							found = true;
						}
					}
				}
			}
			if (found) {
				assemblyFilters.Add (asm);
				unhandledExceptionRequest.Disable ();
				unhandledExceptionRequest.AssemblyFilter = assemblyFilters;
				unhandledExceptionRequest.Enable ();
				return true;
			} else {
				return false;
			}
		}