X-Git-Url: https://git.siccegge.de//index.cgi?p=frida%2Ffrida.git;a=blobdiff_plain;f=src%2Fgui%2FMainwindow.cxx;h=196db38a18b838923a3cc3403b2b6b7d6c8768d0;hp=5643beb23731e7017f0b39b6066297fc05cdac92;hb=f6f7e517e577a67f01256ca0b0edea83729849f4;hpb=119d1aff7df9c3235177c3bf55bd618feb3c1519 diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index 5643beb..196db38 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -88,8 +88,14 @@ void Mainwindow::addFunction(Function* fun) { Disassembler * dis = manager->getDisassembler(); BasicBlock * block = dis->getBasicBlock(fun->getStartAddress()); + uint64_t start_address(std::numeric_limits::max()); + for (auto b : fun->blocks()) { + if (b.first < start_address) + start_address = b.first; + } + local__add_basic_block(block, manager->getDisassembler(), blocks, scene, - block->getStartAddress(), 100); + start_address, 100); QGraphicsView * view = new QGraphicsView(scene); w->addTab(view, "CFG");