Exemplo n.º 1
0
 public void Validate()
 {
     if (DumpedProcess.WasSpecified)
     {
         JobFactoryHelpers.ValidateDumpFilePathForInput(JobFactoryHelpers.GetDumpFilePath(DumpedProcess.DumpFile));
     }
 }
Exemplo n.º 2
0
 public string GetDumpFilePath(IProcessInfo process) => JobFactoryHelpers.GetDumpFilePath(DumpFile ?? $"memorydump-{process.Pid}");
Exemplo n.º 3
0
 private IDebugSessionTarget GetDebugTarget(ConsoleLog console)
 {
     if (RunningProcess.WasSpecified)
     {
         var process = JobFactoryHelpers.TryResolveTargetProcess(RunningProcess, console);
         return(new DebugRunningProcess(process, RunningProcess.SuspendProcess ? DebugMode.Snapshot : DebugMode.Observe));
     }
     if (DumpedProcess.WasSpecified)
     {
         var fullDumpFilePath = JobFactoryHelpers.ValidateDumpFilePathForInput(JobFactoryHelpers.GetDumpFilePath(DumpedProcess.DumpFile));
         return(new DebugMemoryDump(fullDumpFilePath));
     }
     throw new ErrorWithExitCodeException(1, new ProcessNotSpecifiedException().Message)
           {
               ShowUsage = true
           };
 }