示例#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);
}