亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ecostest.cpp

?? ecos實時嵌入式操作系統
?? CPP
?? 第 1 頁 / 共 4 頁
字號:
    if(AtPrompt()){        // gdb's output included one or more prompts    // Send another command along    if(m_nCmdIndex>=m_arstrInferiorCmds.size()){      // Nothing further to say to gdb - exit            m_psp->Kill(); // case 3    } else {      if(m_nCmdIndex>0 && 0==_tcscmp(_T("load"),m_arstrInferiorCmds[m_nCmdIndex-1])){        // load command was previous command - we are no longer downloading        m_bDownloading=false;      }      String strCmd(m_arstrInferiorCmds[m_nCmdIndex++]);      // If we can there is a GDB instruction to send to gdb, do it      String str;      if(GetDirective(_T("GDB:"),str,m_nLastGdbInst)){        strCmd=str;        m_nCmdIndex--; // undo increment above      }      if(0==_tcscmp(_T("load"),strCmd)){        // load command issued - we are now "downloading"        m_bDownloading=true;      } else if(0==_tcscmp(_T("run"),strCmd) || 0==_tcscmp(_T("cont"),strCmd)){        SetStatus(NoResult);      }             strCmd+=_TCHAR('\n');      LogString(strCmd);      m_psp->Send(strCmd);              }  }  // If there is a EXEC instruction to process, obey it  String strCmd;  while(GetDirective(_T("EXEC:"),strCmd,m_nLastExecInst)){    CSubprocess *pExecsp=new CSubprocess;    pExecsp->SetPath(m_strPath);    if(!pExecsp->Run(AppendFunc,this,(LPCTSTR)strCmd,false)){      Log(_T("%%%% Failed to create process '%s'\n"),(LPCTSTR)strCmd);      delete pExecsp;    } else {      m_arpExecsp.push_back(pExecsp);    }  }  // If there is a PIPE instruction to process, obey it  while(GetDirective(_T("PIPE:"),strCmd,m_nLastPipeInst)){    if(m_pspPipe){      Log(_T("%%%% Two PIPE commands are a no-no\n"));    } else {      m_pspPipe=new CSubprocess;      m_pspPipe->SetPath(m_strPath);      if(!m_pspPipe->Run(AppendFunc,this,(LPCTSTR)strCmd,false)){        Log(_T("%%%% Failed to create process '%s'\n"),(LPCTSTR)strCmd);        delete m_pspPipe;        m_pspPipe=0;      } else {        // Send what we read have so far        m_pspPipe->Send(m_strOutput);      }    }  }  while(GetDirective(_T("TIMEOUT:"),strCmd,m_nLastTimeoutInst)){    int n=_ttoi(strCmd);    if(n){      SetTimeouts(n); // second parameter is download timeout, which is now irrelevant    } else {      Log(_T("%%%% Illegal timeout specified: %s\n"),(LPCTSTR)strCmd);    }  }}void CeCosTest::RunInferior(LPCTSTR pszCmdline){  m_psp=new CSubprocess;  m_psp->SetContinuationFunc(SCheckForTimeout,this);  try {    m_nMaxInactiveTime=0;    m_nTotalTime=0;    m_nDownloadTime=0;    m_nOutputLen=0;    m_bDownloading=false;        // Decide on the baseline status - NotStarted if there is a download element, NoResult otherwise.    m_Status=NoResult;    for(unsigned int i=0;i<m_arstrInferiorCmds.size();i++){      if(0==_tcscmp(_T("run"),m_arstrInferiorCmds[i]) || 0==_tcscmp(_T("cont"),m_arstrInferiorCmds[i])){        m_Status=NotStarted;        break;      }    }    TRACE(_T("Status <- %s\n"),(LPCTSTR)Image(m_Status));    m_tPrevSample=0; // force an initial reading    m_tInferiorCpuTime=0;    m_tBase=m_tBase0=InferiorTime(); // Returns either Now() or nothing    m_tWallClock0=Now();    m_nCmdIndex=0;      TRACE(_T("RunGDB()\n"));      m_nLastGdbInst=m_nLastExecInst=m_nLastTimeoutInst=m_nLastPipeInst=0;    m_psp->SetPath(m_strPath);    if(m_psp->Run(SInferiorOutputFunc,this,pszCmdline,true)){      if(m_pspPipe){        m_pspPipe->Send(_T("\n"));        m_pspPipe->CloseInput();        if(m_pspPipe->Wait(5000)){          // OK the pipe process terminated.          int rc=m_pspPipe->GetExitCode();          if(0!=rc){            Log(_T("%%%% Pipe process returned rc=%d\n"),rc);            SetStatus(Fail);          }        } else {          LogString(_T("%%%% Pipe process would not complete\n"));        }      }      AnalyzeOutput();        } else {      Log(_T("Failed to run \"%s\" - %s\n"),pszCmdline,(LPCTSTR)m_psp->ErrorString());    }  }   catch(...){    ERROR(_T("!!! Exception caught in RunInferior()\n"));  }  delete m_psp; // will cause process to be killed as necessary and completion to be waited for  m_psp=NULL;  for(int i=0;i<(signed)m_arpExecsp.size();i++){    delete (CSubprocess *)m_arpExecsp[i]; // ditto  }  m_arpExecsp.clear();  TRACE(_T("Exiting RunInferior()\n"));}void CeCosTest::AnalyzeOutput(){  // This test is pulled out to allow ser_filter to simulate a test failure  if(OutputContains(_T("FAIL:"))){    SetStatus(Fail);  }    if(OutputContains(_T("EXIT:"))||OutputContains(_T("NOTAPPLICABLE:"))){    static LPCTSTR arpszKeepAlive[]={_T("FAIL:"),_T("NOTAPPLICABLE:"), _T("PASS:")};     static const StatusType arStatus[] ={Fail, Inapplicable, Pass};    for(unsigned int i=0;i<sizeof arpszKeepAlive/sizeof arpszKeepAlive[0];i++){      if(OutputContains(arpszKeepAlive[i])){        TRACE(_T("DriveInferior: saw '%s'\n"),arpszKeepAlive[i]);        SetStatus(arStatus[i]); // Do not break!      }    }  }    // Certain output spells failure...  if(OutputContains(_T("cyg_assert_fail ("))){    SetStatus(AssertFail);  } else {    static LPCTSTR arpszSignals[]={_T("SIGBUS"), _T("SIGSEGV"), _T("SIGILL"), _T("SIGFPE"), _T("SIGSYS"), _T("SIGTRAP")};    for(unsigned int i=0;i<sizeof arpszSignals/sizeof arpszSignals[0];i++){      String str1,str2;      str1.Format(_T("signal %s"),arpszSignals[i]);      str2.Format(_T("handle %s nostop"),arpszSignals[i]);      if(OutputContains(str1)&&!OutputContains(str2)){        SetStatus(Fail);        break;      }    }  }    int nIndex=0;  String str;  while(GetDirective(_T("EXPECT:"),str,nIndex)){    // s1 is the pointer to the text following the expect - that to be tested    LPCTSTR s1=(LPCTSTR)m_strOutput+nIndex;    while (_istspace(*s1)){      s1++;    }    // whereas s2 is the pointer to the text in the expect string (what we are expecting)    LPCTSTR s2=(LPCTSTR)str;    while(*s2){      if(*s2!=*s1){        Log(_T("EXPECT:<> failure - expected '%s' saw '%s'\n"),(LPCTSTR)str,(LPCTSTR)m_strOutput+nIndex);        SetStatus(Fail);        break;      }      s1++;      s2++;    }  }}bool CeCosTest::ExecutionParameters::FromStr(LPCTSTR psz){  String str1,str2,str3,str4,str5;  int nUseFilter,nUnused2,nUnused3;  int nLen=_tcslen(psz);  _stscanf(psz,_T("%s %s %d %d %d %d %d %d %d %d %s %s %s"),    str1.GetBuffer(1+nLen),    str2.GetBuffer(1+nLen),    &m_nActiveTimeout,    &m_nDownloadTimeout,    &m_nUnused1,    &m_nUnused2,    &m_nUnused3,    &nUseFilter,    &nUnused2,    &nUnused3,    str3.GetBuffer(1+nLen),    str4.GetBuffer(1+nLen),    str5.GetBuffer(1+nLen)    );  m_bUseFilter=(0!=nUseFilter);              m_bUnused2=(0!=nUnused2);              m_bUnused3=(0!=nUnused3);              str1.ReleaseBuffer();  str2.ReleaseBuffer();  str3.ReleaseBuffer();  str4.ReleaseBuffer();  str5.ReleaseBuffer();  m_Target=str1;  int r;  for(r=0;r<RequestTypeMax;r++){    if(0==_tcscmp(arRequestImage[r],str2)){      break;    }  }  m_Request=(RequestType)r;  return CeCosTestPlatform::IsValid(m_Target);}CeCosTest::ExecutionParameters::ExecutionParameters (RequestType r,                                                     LPCTSTR  Target,                                                     Duration    nActiveTimeout/*=NOTIMEOUT*/,                                                     Duration    nDownloadTimeout/*=NOTIMEOUT*/):  m_bUseFilter(true),  m_Target(Target),  m_nActiveTimeout(nActiveTimeout),  m_nDownloadTimeout(nDownloadTimeout),  m_Request(r),  m_nUnused1(0),  m_nUnused2(0),  m_nUnused3(0),  m_bUnused2(false),  m_bUnused3(false){}String CeCosTest::ExecutionParameters::Image() const{  String str;  str.Format(_T("%s %s %d %d %d %d %d %d %d %d"),(LPCTSTR)PlatformName(),(LPCTSTR)Image(Request()),    ActiveTimeout(),DownloadTimeout(),    m_nUnused1,    m_nUnused2,    m_nUnused3,    m_bUseFilter,    m_bUnused2,    m_bUnused3);  return str;}bool CeCosTest::GetTargetReady(String &strHostPort){  bool rc=false;  int nTargetReady;  do{    if(!m_pSock->recvInteger(nTargetReady,_T("Target ready"),120*1000)){      Log(_T("Failed to read target ready indicator from server - %s\n"),(LPCTSTR)m_pSock->SocketErrString());      break;    }    switch(nTargetReady){    case 0:      LogString(_T("Failed to reset target"));      break;    case 1:      if(m_pSock->recvString(strHostPort, _T("host:port"))){        TRACE(_T("Instructed to use %s\n"),(LPCTSTR)strHostPort);        rc=true;      } else {        Log(_T("Failed to read host:port - %s\n"),(LPCTSTR)m_pSock->SocketErrString());      }      break;    case 2:      {        String strOutput;        if(m_pSock->recvString(strOutput, _T("output"))){          LogString(strOutput);                       } else {          Log(_T("Failed to read output\n"),(LPCTSTR)m_pSock->SocketErrString());          return false;        }      }      break;    }  } while(2==nTargetReady);  return rc;}CeCosTest::ServerStatus CeCosTest::ServerStatusValue(LPCTSTR psz){  int s;  for(s=0;s<ServerStatusMax;s++){    if(0==_tcsicmp(psz,arServerStatusImage[s])){      break;    }  }  return (ServerStatus)s;}// Gets a directive from the test output (like EXEC:)bool CeCosTest::GetDirective(LPCTSTR pszDirective, String &str, int &nIndex){  bool rc=false;  ENTERCRITICAL;  LPCTSTR pszOutput=(LPCTSTR)m_strOutput;  LPCTSTR pc=_tcsstr(pszOutput+nIndex,pszDirective);  if(pc){        pc+=_tcslen(pszDirective); // Now after the final character (':') of the directive    if(_TCHAR('<')==*pc){      pc++;      // Extract the argument      str=_T("");      while(*pc){        // Process escapes: FIXME more escapes?        TCHAR c=*pc;        if(_TCHAR('\\')==c){          switch(pc[1]){            case _TCHAR('t'):              c=_TCHAR('\t');              break;            case _TCHAR('n'):              c=_TCHAR('\n');              break;            case _TCHAR('\0'):              pc--; // avoid grief              break;            default:              c=pc[1];              break;          }          pc++;        } else if (_TCHAR('>')==c) {          nIndex=pc+1-pszOutput;          rc=true;          break;        } else if (_TCHAR('\n')==c) {          nIndex=pc+1-pszOutput;          Log(_T("%%%% Unterminated directive: %s"),(LPCTSTR)str);          break;        }        str+=c;        pc++;      }    }  }  LEAVECRITICAL;  return rc;}void CeCosTest::GetInferiorCommands(StringArray &arstrInferiorCmds){  arstrInferiorCmds.clear();  // Construct commands for gdb.  The commands may be found (semicolon-separated) in the target info:  const String strInferiorCmds(m_ep.Platform()->GdbCmds());  StringArray ar;  int nCmds=strInferiorCmds.Chop(ar,_TCHAR(';'),false);  for(int i=0;i<nCmds;i++){    // Into each command must be substituted:    // Baud rate (%b)      // Port      (%p)  This will be a serial port (e.g. COM1) or a socket connection (e.g.aloo:8000) depending on circumstances.    // and escapes must be dealt with.    String strCmd;    for(const TCHAR *pc=ar[i];*pc;pc++){      switch(*pc){        // Process escapes: FIXME more escapes?        case _TCHAR('\\'):          switch(pc[1]){            case _TCHAR('t'):              strCmd+=_TCHAR('\t');              pc++;              continue;            case _TCHAR('n'):              strCmd+=_TCHAR('\n');              pc++;              continue;            case _TCHAR('\0'):              continue;            default:              break;          }          break;        case _TCHAR('%'):          switch(pc[1]){            case _TCHAR('%'):              strCmd+=_TCHAR('%');              pc++;              break;            case _TCHAR('b'):              if(0==m_pResource->Baud()){                goto NextCmd; // Suppress output of this command if there is no baud rate to output              }              strCmd+=String::SFormat(_T("%d"),m_pResource->Baud());              pc++;              continue;            case _TCHAR('p'):              if(_TCHAR('\0')==*(m_pResource->Serial())){                goto NextCmd; // Suppress output of this command if there is no serial port              }              strCmd+=m_pResource->Serial();              pc++;              continue;            case _TCHAR('\0'):              continue;            default:              break;          }          break;        default:          break;      }      strCmd+=*pc;    }    arstrInferiorCmds.push_back(strCmd);NextCmd:    ;  }  return;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
av激情综合网| 26uuu精品一区二区三区四区在线| 久久66热re国产| 国产一区二区日韩精品| 成人av影视在线观看| 色偷偷久久一区二区三区| 成人精品国产一区二区4080| 成人性视频免费网站| 91一区二区三区在线播放| 国产传媒欧美日韩成人| 91老司机福利 在线| 欧美日韩不卡一区二区| 中文字幕综合网| 国产福利视频一区二区三区| 中文字幕在线不卡一区二区三区| 国v精品久久久网| 国产精品私人自拍| 国产乱子轮精品视频| 在线观看视频91| 麻豆一区二区三| 一本大道久久精品懂色aⅴ| 日韩欧美成人一区二区| 亚洲影视资源网| 成人黄色网址在线观看| 国产精品美女久久久久aⅴ国产馆| 亚洲欧美日韩国产综合在线| 国产91精品一区二区| 久久精品视频一区二区| 精品一区二区在线视频| 国产日韩精品久久久| 精品一区二区三区日韩| 欧美成人女星排行榜| 国产高清成人在线| 亚洲天堂成人在线观看| 色婷婷综合久久久| 日本vs亚洲vs韩国一区三区| 色综合久久88色综合天天免费| 精品国产乱码久久久久久1区2区| 久久99久久99| 亚洲女女做受ⅹxx高潮| 色综合久久88色综合天天6| 日韩av一区二| 国产亚洲成年网址在线观看| 色婷婷综合久久久久中文一区二区| 亚洲欧洲精品天堂一级| 日韩一区二区电影在线| 91福利国产精品| 国产成人精品免费视频网站| 亚洲一区二区三区中文字幕| 国产精品视频一二三区| 欧美mv日韩mv国产网站app| 欧美日韩亚洲不卡| 午夜一区二区三区视频| 精品国产污污免费网站入口| 欧美精品v国产精品v日韩精品| 99久久精品情趣| 午夜精品福利一区二区三区av| 国产女主播视频一区二区| 日韩精品一区二| 欧美精品久久99| 欧美午夜电影网| 在线观看视频一区二区| 欧美亚洲综合在线| 成人激情视频网站| 国产成人精品亚洲午夜麻豆| 激情综合五月婷婷| 久久99久久久欧美国产| 亚洲蜜臀av乱码久久精品蜜桃| 成人欧美一区二区三区| 中文字幕久久午夜不卡| 自拍偷拍欧美激情| 亚洲另类色综合网站| 亚洲欧美视频一区| 午夜视频一区二区| 黄色日韩网站视频| 国产一区二区三区高清播放| 国产福利91精品一区| 91免费视频观看| 欧美三级韩国三级日本三斤| 99精品国产一区二区三区不卡| 91极品视觉盛宴| 日韩一二三区不卡| 中文字幕一区av| 青青草原综合久久大伊人精品 | 福利电影一区二区| 亚洲欧洲综合另类| 精品一区二区三区在线视频| 欧美一二区视频| 91视频.com| 日本不卡高清视频| 色综合一区二区三区| 91老师国产黑色丝袜在线| 91蜜桃免费观看视频| 精品在线观看视频| 日韩有码一区二区三区| 亚洲美女一区二区三区| 国产亚洲短视频| 欧美一区二区播放| 91片黄在线观看| 国产成人综合网站| 免费观看30秒视频久久| 婷婷久久综合九色综合绿巨人 | 国产在线一区二区综合免费视频| 亚洲精品免费在线| 中文字幕的久久| 欧美r级在线观看| 精品欧美久久久| 777xxx欧美| 欧美一级精品大片| 欧美日韩国产一区二区三区地区| 91激情五月电影| 欧美私模裸体表演在线观看| 3751色影院一区二区三区| 久久综合九色综合97_久久久| 国产色产综合产在线视频| 亚洲国产另类av| 成人高清视频在线| 老司机免费视频一区二区 | 久久久国产一区二区三区四区小说 | 视频一区欧美精品| 男女男精品视频网| 国产成人综合自拍| 欧美日韩免费一区二区三区视频| 欧美午夜精品久久久久久孕妇 | 美日韩一级片在线观看| 日韩高清国产一区在线| 色婷婷狠狠综合| 欧美日韩中文字幕一区| 91麻豆精品国产91久久久久久久久 | 日本精品一级二级| 国产欧美一区视频| 亚洲一二三四区| 激情小说亚洲一区| 欧美羞羞免费网站| 久久久噜噜噜久久中文字幕色伊伊| 中文一区在线播放| 久久精品噜噜噜成人av农村| 成人黄色在线看| 精品久久久久久久久久久久包黑料| 亚洲日本韩国一区| 国产激情偷乱视频一区二区三区| 在线观看一区不卡| 一区二区三区不卡视频| 国产老妇另类xxxxx| 欧美日韩亚洲综合一区二区三区| 国产精品免费免费| 捆绑调教美女网站视频一区| 色94色欧美sute亚洲线路二| 中文欧美字幕免费| 国产乱色国产精品免费视频| 欧美一级片在线看| 天天综合网 天天综合色| 在线亚洲免费视频| 亚洲精品国产精华液| av亚洲精华国产精华精华| 国产精品毛片a∨一区二区三区| 国产成人一级电影| 欧美国产日韩一二三区| 91精品国产全国免费观看| 亚洲高清免费一级二级三级| 日本高清视频一区二区| 亚洲一区二区av在线| 欧美一级黄色片| 懂色av噜噜一区二区三区av| 1区2区3区国产精品| 欧美性猛交xxxx乱大交退制版| 一区二区高清免费观看影视大全 | 久久精品人人做人人综合| 国产一区视频在线看| 国产精品护士白丝一区av| 欧洲色大大久久| 久久精品噜噜噜成人88aⅴ| 欧美国产在线观看| 欧美精品在线一区二区| 国产精品香蕉一区二区三区| 亚洲欧美另类小说视频| 欧美裸体一区二区三区| 激情久久久久久久久久久久久久久久| 中文幕一区二区三区久久蜜桃| 69堂亚洲精品首页| 91免费版在线看| 国产精品综合在线视频| 亚洲国产日产av| 中文字幕中文乱码欧美一区二区| 欧美电影一区二区| 成人午夜视频免费看| 久久成人av少妇免费| 肉肉av福利一精品导航| 一区二区三区国产豹纹内裤在线| 欧美激情中文字幕| 亚洲高清一区二区三区| 亚洲色图欧美偷拍| 国产精品久久久一本精品| 久久天堂av综合合色蜜桃网| 欧美一区在线视频| 欧美一区二区三区小说| 欧美一区二区高清| 久久综合狠狠综合久久综合88| 欧美zozo另类异族| 久久品道一品道久久精品|