Пример #1
0
void GdbDebugger::runToLine(const QString &fileName, int line)
{
    line++;
    GdbCmd cmd;
    QStringList args;
    args << "-break-insert";
    args << "-t";
    args << QString("%1:%2").arg(fileName).arg(line);
    cmd.setCmd(args);
    command(cmd);
    command("-exec-continue");
}
Пример #2
0
void GdbDebugger::removeBreakPoint(const QString &fileName, int line)
{
    line++;
    QString location = QString("%1:%2").arg(fileName).arg(line);
    QString number = m_locationBkMap.key(location);
    if (number.isEmpty()) {
        return;
    }
    QStringList args;
    args << "-break-delete";
    args << number;
    GdbCmd cmd;
    cmd.setCmd(args);
    command(cmd);
}
Пример #3
0
void GdbDebugger::insertBreakPoint(const QString &fileName, int line)
{
    line++;
    QString location = QString("%1:%2").arg(fileName).arg(line);
    if (m_locationBkMap.contains(location)) {
        return;
    }
    QStringList args;
    args << "-break-insert";
    args << QString("%1:%2").arg(fileName).arg(line);
    GdbCmd cmd;
    cmd.setCmd(args);
    cmd.insert("file",fileName);
    cmd.insert("line",line);
    command(cmd);
}
Пример #4
0
void GdbDebugger::removeWatchByName(const QString &name, bool children)
{
    QString var = m_varNameMap.key(name);
    QStringList args;
    args << "-var-delete";
    if (children) {
        args << "-c";
    }
    args << name;
    GdbCmd cmd;
    cmd.setCmd(args);
    cmd.insert("var",var);
    cmd.insert("name",name);
    cmd.insert("children",children);
    command(cmd);
}
Пример #5
0
void GdbDebugeer::removeWatch(const QString &var, bool children)
{
    QString name = m_varNameMap.value(var);
    QStringList args;
    args << "-var-delete";
    if (children) {
        args << "-c";
    }
    args << name;
    GdbCmd cmd;
    cmd.setCmd(args);
    cmd.insert("var",var);
    cmd.insert("name",name);
    cmd.insert("children",children);
    command(cmd);
}
Пример #6
0
void GdbDebugger::createWatch(const QString &var, bool floating, bool watchModel)
{
    GdbCmd cmd;
    QStringList args;
    args << "-var-create";
    args << "-";
    if (floating) {
        args << "@";
    } else {
        args << "*";
    }
    args << var;
    cmd.setCmd(args);
    cmd.insert("var",var);
    if (watchModel) {
        cmd.insert("watchModel",true);
    }
    command(cmd);
}