X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2FMainwindow.cxx;h=5643beb23731e7017f0b39b6066297fc05cdac92;hp=34dcfb1496dd05dfa29095b34971c9383d5d94f8;hb=119d1aff7df9c3235177c3bf55bd618feb3c1519;hpb=4ce83d6b47b1410a5356a6bbb11346b857740ce6 diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 34dcfb1..5643beb 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -23,9 +23,11 @@ Mainwindow::Mainwindow(InformationManager* mgr) // saveAction = new QAction(tr("&Save"), this); exitAction = new QAction(tr("E&xit"), this); - connect(openAction, SIGNAL(triggered()), this, SLOT(open())); + connect(openAction, SIGNAL(triggered()), + this, SLOT(open())); // connect(saveAction, SIGNAL(triggered()), this, SLOT(save())); - connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit())); + connect(exitAction, SIGNAL(triggered()), + qApp, SLOT(quit())); fileMenu = menuBar()->addMenu(tr("&File")); fileMenu->addAction(openAction); @@ -86,7 +88,8 @@ void Mainwindow::addFunction(Function* fun) { Disassembler * dis = manager->getDisassembler(); BasicBlock * block = dis->getBasicBlock(fun->getStartAddress()); - local__add_basic_block(block, manager->getDisassembler(), blocks, scene, block->getStartAddress(), 100); + local__add_basic_block(block, manager->getDisassembler(), blocks, scene, + block->getStartAddress(), 100); QGraphicsView * view = new QGraphicsView(scene); w->addTab(view, "CFG"); @@ -123,8 +126,11 @@ namespace { widget->setFlag(QGraphicsItem::ItemIsMovable, true); widget->moveBy(100*startx, block->getStartAddress() - starty); - dis->printEachInstruction(block->getStartAddress(), block->getEndAddress(), - [&](uint8_t* bytes, size_t byte_count, const std::string& line) { + dis->printEachInstruction(block->getStartAddress(), + block->getEndAddress(), + [&](uint8_t* bytes, + size_t byte_count, + const std::string& line) { widget->addItem(bytes, byte_count, line.c_str() + 1); });