Esempio n. 1
0
void DisassembleWidget::getAsmToDisplay(const QString& addr1, const QString& addr2)
{
    Q_ASSERT(!m_currentAddress.isNull());

    QString cmd = (addr2.isEmpty())?
        QString("-s %1 -e \"%1 + 128\" -- 0").arg( addr1.isEmpty() ? "$pc" : addr1 ):
        QString("-s %1 -e %2+1 -- 0").arg(addr1).arg(addr2); // if both addr set
        
    DebugSession *s = qobject_cast<DebugSession*>(KDevelop::ICore::
            self()->debugController()->currentSession());
    if (s) {
        s->addCommandToFront(
            new GDBCommand(DataDisassemble, cmd, this, &DisassembleWidget::memoryRead ) );
    }
}
void DisassembleWidget::getNextDisplay()
{
    kDebug();

    if (address_)
    {
        Q_ASSERT(!currentAddress_.isNull());

        QString cmd = QString("-s $pc -e \"$pc + 128\" -- 0");
        DebugSession *s = qobject_cast<DebugSession*>(KDevelop::ICore::self()->debugController()->currentSession());
        if (s) {
            s->addCommandToFront(
                        new GDBCommand(DataDisassemble, cmd, this, &DisassembleWidget::memoryRead ) );
        }
    }
}