public void fAppError(LaunchTool _oTool, string _sOut) { //E> Function "GDB_Func_Break" not defined. if (_sOut.IndexOf("Function \"GDB_Func_Break\" not defined") != -1) { Output.TraceActionLite("Tips: To have in-code GDB break, add this function: extern \"C\" void GDB_Func_Break(){}"); return; } if (_sOut.IndexOf("Function \"GDB_Func_ExecuteCmds\" not defined") != -1) { Output.TraceActionLite("Tips: To have in-code GDB command-line, add this function: extern \"C\" void GDB_Func_ExecuteCmds(){}\nSend command like this: fprintf(stderr,\"Cmd[GDB]:yourCmd\")"); return; } // bRunning= false; oLaunchProject.bReceiveOutput = true; // bCmdSend = false;//Proble occur, we can resend cmd if (bCmdSend) { if (fTestEndOfCommand(_sOut)) //Or just check resutl? { return; } else { _sOut = sCurrentCmd; } } Output.ProcessStdErr(_sOut); // Output.Trace("E> " + _sOut); }
public static void ProcessCmdSendToApp(string _sCmd, string _sAppName) { string _sAppNameNorm = _sAppName.ToLower(); foreach (LaunchTool _oLaunch in LaunchTool.aLaunchList) { if (_oLaunch.sExeName.ToLower() == _sAppNameNorm) { Output.TraceActionLite("C> Send[" + _sAppName + "]:" + _sCmd); // _oLaunch.fSend(_sCmd.Substring(_sCmd.Length)); _oLaunch.fSend(_sCmd.Trim()); return; } } Output.TraceErrorLite("C> Unable to Send:[" + _sAppName + "]" + _sCmd); }