void OutputPane::reRunRunControl()
{
    int index = m_tabWidget->currentIndex();
    RunControl *rc = runControlForTab(index);
    OutputWindow *ow = static_cast<OutputWindow *>(m_tabWidget->widget(index));
    if (ProjectExplorerPlugin::instance()->projectExplorerSettings().cleanOldAppOutput)
        ow->clear();
    else
        ow->grayOutOldContent();
    ow->verticalScrollBar()->setValue(ow->verticalScrollBar()->maximum());
    rc->start();
}
void MemcheckWithGdbRunControl::startDebugger()
{
    const qint64 valgrindPid = runner()->valgrindProcess()->pid();
    const AnalyzerStartParameters &mySp = startParameters();

    Debugger::DebuggerStartParameters sp;
    sp.executable = mySp.debuggee;
    sp.startMode = Debugger::AttachToRemoteServer;
    sp.displayName = QString::fromLatin1("VGdb %1").arg(valgrindPid);
    sp.remoteChannel = QString::fromLatin1("| vgdb --pid=%1").arg(valgrindPid);
    sp.useContinueInsteadOfRun = true;
    sp.expectedSignals.append("SIGTRAP");

    QString errorMessage;
    RunControl *gdbRunControl = Debugger::createDebuggerRunControl(sp, runConfiguration(), &errorMessage);
    QTC_ASSERT(gdbRunControl, return);
    connect(gdbRunControl, &RunControl::finished,
            gdbRunControl, &RunControl::deleteLater);
    gdbRunControl->start();
}