Ejemplo n.º 1
0
void DisassembleWidget::runToCursor(){
    DebugSession *s = qobject_cast<DebugSession*>(KDevelop::ICore::
            self()->debugController()->currentSession());
    if (s && s->isRunning()) {
        QString address = m_disassembleWindow->selectedItems().at(0)->text(Address);
        s->runUntil(address);
    }
}
Ejemplo n.º 2
0
void DisassembleWidget::disassembleMemoryRegion(const QString& from, const QString& to)
{
    DebugSession *s = qobject_cast<DebugSession*>(KDevelop::ICore::
            self()->debugController()->currentSession());
    if(!s || !s->isRunning()) return;

    //only get $pc
    if (from.isEmpty()){
        s->addCommand(DataDisassemble, "-s \"$pc\" -e \"$pc+1\" -- 0",
                      this, &DisassembleWidget::updateExecutionAddressHandler);
    }else{

        QString cmd = (to.isEmpty())?
        QString("-s %1 -e \"%1 + 256\" -- 0").arg(from ):
        QString("-s %1 -e %2+1 -- 0").arg(from).arg(to); // if both addr set

        s->addCommand(DataDisassemble, cmd,
                      this, &DisassembleWidget::disassembleMemoryHandler);
   }
}