这篇教程C++ startParameters函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中startParameters函数的典型用法代码示例。如果您正苦于以下问题:C++ startParameters函数的具体用法?C++ startParameters怎么用?C++ startParameters使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了startParameters函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: QTC_ASSERTvoid TermGdbAdapter::startAdapter(){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(_("TRYING TO START ADAPTER"));// Currently, adapters are not re-used// // We leave the console open, so recycle it now.// m_stubProc.blockSignals(true);// m_stubProc.stop();// m_stubProc.blockSignals(false); if (!prepareCommand()) return; m_stubProc.setWorkingDirectory(startParameters().workingDirectory); // Set environment + dumper preload. m_stubProc.setEnvironment(startParameters().environment); // FIXME: Starting the stub implies starting the inferior. This is // fairly unclean as far as the state machine and error reporting go. if (!m_stubProc.start(startParameters().executable, startParameters().processArgs)) { // Error message for user is delivered via a signal. m_engine->handleAdapterStartFailed(QString(), QString()); return; } if (!m_engine->startGdb()) { m_stubProc.stop(); return; }}
开发者ID:gaoxiaojun,项目名称:qtcreator,代码行数:31,
示例2: QTC_ASSERTvoid PlainGdbAdapter::startAdapter(){ QTC_ASSERT(state() == EngineStarting, qDebug() << state()); setState(AdapterStarting); debugMessage(_("TRYING TO START ADAPTER")); QStringList gdbArgs; if (!m_outputCollector.listen()) { emit adapterStartFailed(tr("Cannot set up communication with child process: %1") .arg(m_outputCollector.errorString()), QString()); return; } gdbArgs.append(_("--tty=") + m_outputCollector.serverName()); if (!startParameters().workingDir.isEmpty()) m_engine->m_gdbProc.setWorkingDirectory(startParameters().workingDir); if (!startParameters().environment.isEmpty()) m_engine->m_gdbProc.setEnvironment(startParameters().environment); if (!m_engine->startGdb(gdbArgs)) { m_outputCollector.shutdown(); return; } emit adapterStarted();}
开发者ID:asokolov,项目名称:ananas-creator,代码行数:27,
示例3: QTC_ASSERTvoid LocalPlainGdbAdapter::startAdapter(){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(_("TRYING TO START ADAPTER")); if (!prepareCommand()) return; QStringList gdbArgs; if (!m_outputCollector.listen()) { m_engine->handleAdapterStartFailed(tr("Cannot set up communication with child process: %1") .arg(m_outputCollector.errorString()), QString()); return; } gdbArgs.append(_("--tty=") + m_outputCollector.serverName()); if (!startParameters().workingDirectory.isEmpty()) m_gdbProc.setWorkingDirectory(startParameters().workingDirectory); if (startParameters().environment.size()) m_gdbProc.setEnvironment(startParameters().environment.toStringList()); if (!m_engine->startGdb(gdbArgs)) { m_outputCollector.shutdown(); return; } checkForReleaseBuild(); m_engine->handleAdapterStarted();}
开发者ID:anchowee,项目名称:QtCreator,代码行数:30,
示例4: startParametersvoid GdbRemoteServerEngine::callTargetRemote(){ QByteArray rawChannel = startParameters().remoteChannel.toLatin1(); QByteArray channel = rawChannel; // Don't touch channels with explicitly set protocols. if (!channel.startsWith("tcp:") && !channel.startsWith("udp:") && !channel.startsWith("file:") && channel.contains(':') && !channel.startsWith('|')) { // "Fix" the IPv6 case with host names without '['...']' if (!channel.startsWith('[') && channel.count(':') >= 2) { channel.insert(0, '['); channel.insert(channel.lastIndexOf(':'), ']'); } channel = "tcp:" + channel; } if (m_isQnxGdb) postCommand("target qnx " + channel, CB(handleTargetQnx)); else if (startParameters().multiProcess) postCommand("target extended-remote " + channel, CB(handleTargetExtendedRemote)); else postCommand("target remote " + channel, CB(handleTargetRemote), 10);}
开发者ID:OnlineCop,项目名称:qt-creator,代码行数:25,
示例5: QTC_ASSERTvoid RemoteGdbServerAdapter::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); const DebuggerStartParameters &sp = startParameters(); QString fileName; if (!sp.executable.isEmpty()) { QFileInfo fi(sp.executable); fileName = fi.absoluteFilePath(); } const QByteArray sysroot = sp.sysroot.toLocal8Bit(); const QByteArray remoteArch = sp.remoteArchitecture.toLatin1(); const QByteArray gnuTarget = sp.gnuTarget.toLatin1(); const QByteArray searchPath = startParameters().searchPath.toLocal8Bit(); const QString args = sp.processArgs; if (!remoteArch.isEmpty()) m_engine->postCommand("set architecture " + remoteArch); if (!gnuTarget.isEmpty()) m_engine->postCommand("set gnutarget " + gnuTarget); if (!sysroot.isEmpty()) m_engine->postCommand("set sysroot " + sysroot); if (!searchPath.isEmpty()) m_engine->postCommand("set solib-search-path " + searchPath); if (!args.isEmpty()) m_engine->postCommand("-exec-arguments " + args.toLocal8Bit()); // This has to be issued before 'target remote'. On pre-7.0 the // command is not present and will result in ' No symbol table is // loaded. Use the "file" command.' as gdb tries to set the // value of a variable with name 'target-async'. // // Testing with -list-target-features which was introduced at // the same time would not work either, as this need an existing // target. // // Using it even without a target and having it fail might still // be better as: // Some external comment: '[but] "set target-async on" with a native // windows gdb will work, but then fail when you actually do // "run"/"attach", I think.. // gdb/mi/mi-main.c:1958: internal-error: // mi_execute_async_cli_command: Assertion `is_running (inferior_ptid)' // failed./nA problem internal to GDB has been detected,[...] if (debuggerCore()->boolSetting(TargetAsync)) m_engine->postCommand("set target-async on", CB(handleSetTargetAsync)); if (fileName.isEmpty()) { showMessage(tr("No symbol file given."), StatusBar); callTargetRemote(); return; } m_engine->postCommand("-file-exec-and-symbols /"" + fileName.toLocal8Bit() + '"', CB(handleFileExecAndSymbols));}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:59,
示例6: QTC_ASSERTvoid GdbPlainEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); if (!startParameters().processArgs.isEmpty()) { QString args = startParameters().processArgs; postCommand("-exec-arguments " + toLocalEncoding(args)); } postCommand("-file-exec-and-symbols /"" + execFilePath() + '"', CB(handleFileExecAndSymbols));}
开发者ID:Revulet,项目名称:qtcreator,代码行数:10,
示例7: QTC_ASSERTvoid GdbAttachEngine::setupEngine(){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(_("TRYING TO START ADAPTER")); if (!startParameters().workingDirectory.isEmpty()) m_gdbProc->setWorkingDirectory(startParameters().workingDirectory); if (startParameters().environment.size()) m_gdbProc->setEnvironment(startParameters().environment.toStringList()); startGdb();}
开发者ID:Gardenya,项目名称:qtcreator,代码行数:12,
示例8: Q_UNUSEDvoid RemotePlainGdbAdapter::handleRemoteSetupDone(int gdbServerPort, int qmlPort){ Q_UNUSED(gdbServerPort); QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); if (qmlPort != -1) startParameters().qmlServerPort = qmlPort; if (!startParameters().workingDirectory.isEmpty()) m_gdbProc.setWorkingDirectory(startParameters().workingDirectory); if (startParameters().environment.size()) m_gdbProc.setEnvironment(startParameters().environment.toStringList()); m_gdbProc.realStart(m_engine->startParameters().debuggerCommand, QStringList() << QLatin1String("-i") << QLatin1String("mi"), m_engine->startParameters().executable);}
开发者ID:yinyunqiao,项目名称:qtcreator,代码行数:15,
示例9: readExecutableNameFromCorevoid GdbCoreEngine::continueSetupEngine(){ bool isCore = true; if (m_coreUnpackProcess) { isCore = m_coreUnpackProcess->exitCode() == 0; m_coreUnpackProcess->deleteLater(); m_coreUnpackProcess = 0; if (m_tempCoreFile.isOpen()) m_tempCoreFile.close(); } if (isCore && m_executable.isEmpty()) { GdbCoreEngine::CoreInfo cinfo = readExecutableNameFromCore( startParameters().debuggerCommand, coreFileName()); if (cinfo.isCore) { m_executable = cinfo.foundExecutableName; if (m_executable.isEmpty()) { Core::AsynchronousMessageBox::warning( tr("Error Loading Symbols"), tr("No executable to load symbols from specified core.")); notifyEngineSetupFailed(); return; } } } if (isCore) { startGdb(); } else { Core::AsynchronousMessageBox::warning( tr("Error Loading Core File"), tr("The specified file does not appear to be a core file.")); notifyEngineSetupFailed(); }}
开发者ID:AltarBeastiful,项目名称:qt-creator,代码行数:35,
示例10: QTC_ASSERTvoid CoreGdbAdapter::handleTemporaryTargetCore(const GdbResponse &response){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); if (response.resultClass != GdbResultDone) { showMessage(tr("Attach to core failed."), StatusBar); m_engine->notifyEngineSetupFailed(); return; } QByteArray console = response.consoleStreamOutput; int pos1 = console.indexOf('`'); int pos2 = console.indexOf('/''); if (pos1 == -1 || pos2 == -1) { showMessage(tr("Attach to core failed."), StatusBar); m_engine->notifyEngineSetupFailed(); return; } m_executable = console.mid(pos1 + 1, pos2 - pos1 - 1); // Strip off command line arguments. FIXME: make robust. int idx = m_executable.indexOf(_c(' ')); if (idx >= 0) m_executable.truncate(idx); if (m_executable.isEmpty()) { m_engine->postCommand("detach"); m_engine->notifyEngineSetupFailed(); return; } m_executable = QFileInfo(startParameters().coreFile).absoluteDir() .absoluteFilePath(m_executable); showMessage(tr("Attached to core temporarily."), StatusBar); m_engine->postCommand("detach", CB(handleTemporaryDetach));}
开发者ID:anchowee,项目名称:QtCreator,代码行数:33,
示例11: startParametersvoid GdbRemoteServerEngine::callTargetRemote(){ //m_breakHandler->clearBreakMarkers(); // "target remote" does three things: // (1) connects to the gdb server // (2) starts the remote application // (3) stops the remote application (early, e.g. in the dynamic linker) QByteArray channel = startParameters().remoteChannel.toLatin1(); // Don't touch channels with explicitly set protocols. if (!channel.startsWith("tcp:") && !channel.startsWith("udp:") && !channel.startsWith("file:") && channel.contains(':')) { // "Fix" the IPv6 case with host names without '['...']' if (!channel.startsWith('[') && channel.count(':') >= 2) { channel.insert(0, '['); channel.insert(channel.lastIndexOf(':'), ']'); } channel = "tcp:" + channel; } if (m_isQnxGdb) postCommand("target qnx " + channel, CB(handleTargetQnx)); else postCommand("target remote " + channel, CB(handleTargetRemote));}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:27,
示例12: readerQString GdbCoreEngine::readExecutableNameFromCore(bool *isCore){#if 0 ElfReader reader(coreFileName()); return QString::fromLocal8Bit(reader.readCoreName(isCore));#else const DebuggerStartParameters &sp = startParameters(); QStringList args; args.append(QLatin1String("-nx")); args.append(QLatin1String("-batch")); args.append(QLatin1String("-c")); args.append(coreFileName()); QProcess proc; proc.start(sp.debuggerCommand, args); if (proc.waitForFinished()) { QByteArray ba = proc.readAllStandardOutput(); // Core was generated by `/data/dev/creator-2.6/bin/qtcreator'. // Program terminated with signal 11, Segmentation fault. int pos1 = ba.indexOf("Core was generated by"); if (pos1 != -1) { pos1 += 23; int pos2 = ba.indexOf('/'', pos1); if (pos2 != -1) { *isCore = true; return QString::fromLocal8Bit(ba.mid(pos1, pos2 - pos1)); } } } return QString();#endif}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:31,
示例13: runEnginevoid GdbPlainEngine::runEngine(){ if (startParameters().useContinueInsteadOfRun) postCommand("-exec-continue", GdbEngine::RunRequest, CB(handleExecuteContinue)); else postCommand("-exec-run", GdbEngine::RunRequest, CB(handleExecRun));}
开发者ID:Revulet,项目名称:qtcreator,代码行数:7,
示例14: QTC_ASSERTvoid GdbAttachEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); const qint64 pid = startParameters().attachPID; postCommand("attach " + QByteArray::number(pid), CB(handleAttach)); // Task 254674 does not want to remove them //qq->breakHandler()->removeAllBreakpoints();}
开发者ID:KDE,项目名称:android-qt-creator,代码行数:8,
示例15: EDEBUGvoid QmlCppEngine::setupEngine(){ EDEBUG("/nMASTER SETUP ENGINE"); setActiveEngine(m_cppEngine); m_qmlEngine->setupSlaveEngine(); m_cppEngine->setupSlaveEngine(); if (startParameters().remoteSetupNeeded) notifyEngineRequestRemoteSetup();}
开发者ID:FlavioFalcao,项目名称:qt-creator,代码行数:10,
示例16: _void LocalPlainGdbAdapter::checkForReleaseBuild(){ QString objDump = _("objdump"); // Windows: Locate objdump in the debuggee's (MinGW) environment if (ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::WindowsOS && startParameters().environment.size()) { objDump = startParameters().environment.searchInPath(objDump); } else { objDump = Utils::Environment::systemEnvironment().searchInPath(objDump); } if (objDump.isEmpty()) { showMessage(_("Could not locate objdump command for release build check"), LogWarning); return; } // Quick check for a "release" build QProcess proc; QStringList args; args.append(_("-h")); args.append(_("-j")); args.append(_(".debug_info")); args.append(startParameters().executable); proc.start(objDump, args); proc.closeWriteChannel(); if (!proc.waitForStarted()) { showMessage(_("OBJDUMP PROCESS COULD NOT BE STARTED. " "RELEASE BUILD CHECK WILL FAIL")); return; } proc.waitForFinished(); QByteArray ba = proc.readAllStandardOutput(); // This should yield something like // "debuggertest: file format elf32-i386/n/n" // "Sections:/nIdx Name Size VMA LMA File off Algn/n" // "30 .debug_info 00087d36 00000000 00000000 0006bbd5 2**0/n" // " CONTENTS, READONLY, DEBUGGING" if (ba.contains("Sections:") && !ba.contains(".debug_info")) { showMessageBox(QMessageBox::Information, "Warning", tr("This does not seem to be a /"Debug/" build./n" "Setting breakpoints by file name and line number may fail.")); }}
开发者ID:anchowee,项目名称:QtCreator,代码行数:41,
示例17: Q_UNUSEDvoid GdbRemotePlainEngine::notifyEngineRemoteSetupDone(int gdbServerPort, int qmlPort){ Q_UNUSED(gdbServerPort); QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); DebuggerStartParameters &sp = startParameters(); if (qmlPort != -1) sp.qmlServerPort = qmlPort; m_gdbProc.realStart(sp.debuggerCommand, QStringList() << QLatin1String("-i") << QLatin1String("mi"), sp.executable);}
开发者ID:KDE,项目名称:android-qt-creator,代码行数:12,
示例18: startParametersvoid RemoteGdbServerAdapter::callTargetRemote(){ //m_breakHandler->clearBreakMarkers(); // "target remote" does three things: // (1) connects to the gdb server // (2) starts the remote application // (3) stops the remote application (early, e.g. in the dynamic linker) QString channel = startParameters().remoteChannel; m_engine->postCommand("target remote " + channel.toLatin1(), CB(handleTargetRemote));}
开发者ID:pcacjr,项目名称:qt-creator,代码行数:12,
示例19: QTC_ASSERTvoid GdbCoreEngine::setupEngine(){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(_("TRYING TO START ADAPTER")); const DebuggerStartParameters &sp = startParameters(); m_executable = sp.executable; QFileInfo fi(sp.coreFile); m_coreName = fi.absoluteFilePath(); unpackCoreIfNeeded();}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:12,
示例20: QTC_ASSERTvoid RemoteGdbAdapter::startAdapter(){ QTC_ASSERT(state() == EngineStarting, qDebug() << state()); setState(AdapterStarting); debugMessage(_("TRYING TO START ADAPTER")); // FIXME: make asynchroneous // Start the remote server if (startParameters().serverStartScript.isEmpty()) { m_engine->showStatusMessage(_("No server start script given. " "Assuming server runs already.")); } else { m_uploadProc.start(_("/bin/sh ") + startParameters().serverStartScript); m_uploadProc.waitForStarted(); } if (!m_engine->startGdb(QStringList(), startParameters().debuggerCommand)) // FIXME: cleanup missing return; emit adapterStarted();}
开发者ID:TheProjecter,项目名称:project-qtcreator,代码行数:22,
示例21: QTC_ASSERTvoid GdbRemoteServerEngine::runEngine(){ QTC_ASSERT(state() == EngineRunRequested, qDebug() << state()); const QString remoteExecutable = startParameters().remoteExecutable; if (!remoteExecutable.isEmpty()) { // Cannot use -exec-run for QNX gdb 7.4 as it does not support path parameter for the MI call const bool useRun = m_isQnxGdb && m_gdbVersion > 70300; const QByteArray command = useRun ? "run" : "-exec-run"; postCommand(command + " " + remoteExecutable.toLocal8Bit(), GdbEngine::RunRequest, CB(handleExecRun)); } else { notifyEngineRunAndInferiorStopOk(); continueInferiorInternal(); }}
开发者ID:mornelon,项目名称:QtCreator_compliments,代码行数:15,
示例22: QTC_ASSERTvoid CoreGdbAdapter::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); // Do that first, otherwise no symbols are loaded. QFileInfo fi(m_executable); const QByteArray sysroot = startParameters().sysroot.toLocal8Bit(); QByteArray path = fi.absoluteFilePath().toLocal8Bit(); if (!sysroot.isEmpty()) { m_engine->postCommand("set sysroot " + sysroot); // sysroot is not enough to correctly locate the sources, so explicitly // relocate the most likely place for the debug source m_engine->postCommand("set substitute-path /usr/src " + sysroot + "/usr/src"); } m_engine->postCommand("-file-exec-and-symbols /"" + path + '"', CB(handleFileExecAndSymbols));}
开发者ID:gaoxiaojun,项目名称:qtcreator,代码行数:16,
示例23: QTC_ASSERTvoid GdbRemotePlainEngine::setupEngine(){ QTC_ASSERT(state() == EngineSetupRequested, qDebug() << state()); showMessage(QLatin1String("TRYING TO START ADAPTER")); if (!startParameters().workingDirectory.isEmpty()) m_gdbProc.setWorkingDirectory(startParameters().workingDirectory); if (startParameters().environment.size()) m_gdbProc.setEnvironment(startParameters().environment.toStringList()); notifyEngineRemoteSetupDone(startParameters().connParams.port, startParameters().qmlServerPort);}
开发者ID:KDE,项目名称:android-qt-creator,代码行数:12,
示例24: QTC_ASSERTvoid ScriptEngine::setupInferior(){ QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); m_scriptFileName = QFileInfo(startParameters().executable).absoluteFilePath(); showMessage(_("SCRIPT FILE: ") + m_scriptFileName); QFile scriptFile(m_scriptFileName); if (!scriptFile.open(QIODevice::ReadOnly|QIODevice::Text)) { showMessageBox(QMessageBox::Critical, tr("Error:"), _("Cannot open script file %1:/n%2"). arg(m_scriptFileName, scriptFile.errorString())); notifyInferiorSetupFailed(); return; } QTextStream stream(&scriptFile); m_scriptContents = stream.readAll(); scriptFile.close(); attemptBreakpointSynchronization(); notifyInferiorSetupOk();}
开发者ID:NoobSaibot,项目名称:qtcreator-minimap,代码行数:19,
注:本文中的startParameters函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ startPoint函数代码示例 C++ startLink函数代码示例 |