]> git.siccegge.de Git - frida/frida.git/blobdiff - src/gui/Mainwindow.cxx
Name Blocks according to start *and* end address
[frida/frida.git] / src / gui / Mainwindow.cxx
index 1c8ae0bb2225b49e2132b8cb9dcc188c2c2fcb25..745fd3ed7c0dfb9f4d10046724a34f7d9b0597a6 100644 (file)
@@ -72,15 +72,16 @@ namespace {
        void local__add_basic_block(BasicBlock * block, Disassembler * dis, QGraphicsScene * scene,
                                                                uint64_t starty, uint64_t startx) {
                std::stringstream s;
-               s << "BLOCK_" << std::hex << block->getStartAddress();
+               s << "BLOCK_" << std::hex << block->getStartAddress()
+                 << "_" << block->getEndAddress();
                BasicBlockWidget * widget = new BasicBlockWidget(s.str().c_str());
                scene->addItem(widget);
                widget->setFlag(QGraphicsItem::ItemIsMovable, true);
                widget->moveBy(100*startx, 10*(block->getStartAddress() - starty));
 
                dis->printEachInstruction(block->getStartAddress(), block->getEndAddress(),
-                                                                 [&](const std::string& line) {
-                                                                         widget->addItem(line.c_str());
+                                                                 [&](uint8_t* bytes, size_t byte_count, const std::string& line) {
+                                                                         widget->addItem(bytes, byte_count, line.c_str() + 1);
                                                                  });
 
                if (block->getNextBlock(0) != 0)