private async Task ProcessChild(ThreadProgress state) { Debug.Assert(state.Newpid != 0, "Child process id not found."); if (state.Newpid != 0) { uint inf = _process.InferiorByPid(state.Newpid); if (inf != 0) { await _process.ConsoleCmdAsync("inferior " + inf.ToString(), allowWhileRunning : false); if (!string.IsNullOrEmpty(_mainBreak)) { await _process.MICommandFactory.BreakDelete(_mainBreak); _mainBreak = null; } state.State = State.AtSignal; await _process.MICommandFactory.Signal("SIGSTOP"); // stop the child } } }
internal static Task<string> ExecuteCommand(string command, DebuggedProcess process, bool ignoreFailures = false) { if (string.IsNullOrWhiteSpace(command)) throw new ArgumentNullException("command"); if (process == null) { throw new InvalidOperationException(MICoreResources.Error_NoMIDebuggerProcess); } command = command.Trim(); if (command[0] == '-') { return ExecuteMiCommand(process, command, ignoreFailures); } else { return process.ConsoleCmdAsync(command, ignoreFailures); } }
internal static Task <string> ExecuteCommand(string command, DebuggedProcess process) { if (string.IsNullOrWhiteSpace(command)) { throw new ArgumentNullException("command"); } if (process == null) { throw new InvalidOperationException(MICoreResources.Error_NoMIDebuggerProcess); } command = command.Trim(); if (command[0] == '-') { return(ExecuteMiCommand(process, command)); } else { return(process.ConsoleCmdAsync(command)); } }
internal static Task <string> ExecuteCommand(string command, DebuggedProcess process, bool ignoreFailures = false) { if (string.IsNullOrWhiteSpace(command)) { throw new ArgumentNullException(nameof(command)); } if (process == null) { throw new InvalidOperationException(MICoreResources.Error_NoMIDebuggerProcess); } command = command.Trim(); if (command[0] == '-') { return(ExecuteMiCommand(process, command, ignoreFailures)); } else { return(process.ConsoleCmdAsync(command, allowWhileRunning: false, ignoreFailures: ignoreFailures)); } }