Пример #1
0
 public BreakProcessHelper(DnDebugger debugger, BreakProcessKind type, string filename)
 {
     this.debugger = debugger ?? throw new ArgumentNullException(nameof(debugger));
     this.type     = type;
     this.filename = filename;
     AddStartupBreakpoint();
 }
Пример #2
0
 public BreakProcessHelper(DnDebugger debugger, BreakProcessKind type, string filename, string?managedDllFilename)
 {
     this.debugger = debugger ?? throw new ArgumentNullException(nameof(debugger));
     this.type     = type;
     this.filename = Path.GetFullPath(managedDllFilename ?? filename);
     AddStartupBreakpoint();
 }
Пример #3
0
        static DBG.BreakProcessKind Convert(BreakProcessKind kind)
        {
            switch (kind)
            {
            case BreakProcessKind.None:                                             return(DBG.BreakProcessKind.None);

            case BreakProcessKind.CreateProcess:                    return(DBG.BreakProcessKind.CreateProcess);

            case BreakProcessKind.CreateAppDomain:                  return(DBG.BreakProcessKind.CreateAppDomain);

            case BreakProcessKind.LoadModule:                               return(DBG.BreakProcessKind.LoadModule);

            case BreakProcessKind.LoadClass:                                return(DBG.BreakProcessKind.LoadClass);

            case BreakProcessKind.CreateThread:                             return(DBG.BreakProcessKind.CreateThread);

            case BreakProcessKind.ExeLoadModule:                    return(DBG.BreakProcessKind.ExeLoadModule);

            case BreakProcessKind.ExeLoadClass:                             return(DBG.BreakProcessKind.ExeLoadClass);

            case BreakProcessKind.ModuleCctorOrEntryPoint:  return(DBG.BreakProcessKind.ModuleCctorOrEntryPoint);

            case BreakProcessKind.EntryPoint:                               return(DBG.BreakProcessKind.EntryPoint);

            default: Debug.Fail("Invalid break kind");              return((DBG.BreakProcessKind)(-1));
            }
        }
Пример #4
0
		public BreakProcessHelper(DnDebugger debugger, BreakProcessKind type, string filename) {
			if (debugger == null)
				throw new ArgumentNullException();
			this.debugger = debugger;
			this.type = type;
			this.filename = filename;
			AddStartupBreakpoint();
		}
Пример #5
0
		public BreakProcessHelper(DnDebugger debugger, BreakProcessKind type, string filename, bool isAppHost) {
			this.debugger = debugger ?? throw new ArgumentNullException(nameof(debugger));
			this.type = type;
			filename1 = filename;
			if (isAppHost)
				filename2 = Path.ChangeExtension(filename, "dll");
			AddStartupBreakpoint();
		}
Пример #6
0
        public bool Start(string filename, string cmdLine, string cwd, BreakProcessKind breakKind)
        {
            var options = new DebugOptions {
                Filename         = filename,
                CommandLine      = cmdLine,
                CurrentDirectory = cwd,
                BreakProcessKind = breakKind,
            };

            return(Start(options));
        }
Пример #7
0
        public bool StartCoreCLR(string filename, string cmdLine, string cwd, BreakProcessKind breakKind, string hostFilename, string hostCommandLine)
        {
            var options = new CoreCLRDebugOptions();

            options.Options.Filename         = filename;
            options.Options.CommandLine      = cmdLine;
            options.Options.CurrentDirectory = cwd;
            options.Options.BreakProcessKind = breakKind;
            options.HostFilename             = hostFilename;
            options.HostCommandLine          = hostCommandLine;
            return(StartCoreCLR(options));
        }
Пример #8
0
		static DBG.BreakProcessKind Convert(BreakProcessKind kind) {
			switch (kind) {
			case BreakProcessKind.None:						return DBG.BreakProcessKind.None;
			case BreakProcessKind.CreateProcess:			return DBG.BreakProcessKind.CreateProcess;
			case BreakProcessKind.CreateAppDomain:			return DBG.BreakProcessKind.CreateAppDomain;
			case BreakProcessKind.LoadModule:				return DBG.BreakProcessKind.LoadModule;
			case BreakProcessKind.LoadClass:				return DBG.BreakProcessKind.LoadClass;
			case BreakProcessKind.CreateThread:				return DBG.BreakProcessKind.CreateThread;
			case BreakProcessKind.ExeLoadModule:			return DBG.BreakProcessKind.ExeLoadModule;
			case BreakProcessKind.ExeLoadClass:				return DBG.BreakProcessKind.ExeLoadClass;
			case BreakProcessKind.ModuleCctorOrEntryPoint:	return DBG.BreakProcessKind.ModuleCctorOrEntryPoint;
			case BreakProcessKind.EntryPoint:				return DBG.BreakProcessKind.EntryPoint;
			default: Debug.Fail("Invalid break kind");		return (DBG.BreakProcessKind)(-1);
			}
		}
Пример #9
0
 public DebugProcessOptions(CLRTypeDebugInfo info)
 {
     CLRTypeDebugInfo = info;
     DebugOptions     = new DebugOptions();
     BreakProcessKind = BreakProcessKind.None;
 }
Пример #10
0
 public DebugProcessOptions(CLRTypeDebugInfo info)
 {
     this.CLRTypeDebugInfo = info;
     this.DebugOptions     = new DebugOptions();
     this.BreakProcessKind = BreakProcessKind.None;
 }
Пример #11
0
		public DebugProcessOptions(CLRTypeDebugInfo info) {
			this.CLRTypeDebugInfo = info;
			this.DebugOptions = new DebugOptions();
			this.BreakProcessKind = BreakProcessKind.None;
		}
Пример #12
0
		public bool StartCoreCLR(string filename, string cmdLine, string cwd, BreakProcessKind breakKind, string hostFilename, string hostCommandLine) {
			var options = new CoreCLRDebugOptions();
			options.Options.Filename = filename;
			options.Options.CommandLine = cmdLine;
			options.Options.CurrentDirectory = cwd;
			options.Options.BreakProcessKind = breakKind;
			options.HostFilename = hostFilename;
			options.HostCommandLine = hostCommandLine;
			return StartCoreCLR(options);
		}
Пример #13
0
		public bool Start(string filename, string cmdLine, string cwd, BreakProcessKind breakKind) {
			var options = new DebugOptions {
				Filename = filename,
				CommandLine = cmdLine,
				CurrentDirectory = cwd,
				BreakProcessKind = breakKind,
			};
			return Start(options);
		}
Пример #14
0
		public DebugProcessOptions(CLRTypeDebugInfo info) {
			CLRTypeDebugInfo = info;
			DebugOptions = new DebugOptions();
			BreakProcessKind = BreakProcessKind.None;
		}