MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / contextDisasm

Method contextDisasm

gui/qt/mainwindow.cpp:2467–2508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2465}
2466
2467void MainWindow::contextDisasm(const QPoint &posa) {
2468 m_disasm->setTextCursor(m_disasm->cursorForPosition(posa));
2469 QPoint globalPos = m_disasm->mapToGlobal(posa);
2470 QString addrStr = m_disasm->getSelectedAddr();
2471 uint32_t addr = static_cast<uint32_t>(hex2int(addrStr));
2472
2473 QMenu menu;
2474 QAction *runUntil = menu.addAction(ACTION_RUN_UNTIL);
2475 menu.addSeparator();
2476 QAction *toggleBreak = menu.addAction(ACTION_TOGGLE_BREAK);
2477 QAction *toggleRead = menu.addAction(ACTION_TOGGLE_READ);
2478 QAction *toggleWrite = menu.addAction(ACTION_TOGGLE_WRITE);
2479 QAction *toggleRw = menu.addAction(ACTION_TOGGLE_RW);
2480 menu.addSeparator();
2481 QAction *gotoMem = gotoMemAction(&menu);
2482 QAction *setPc = menu.addAction(tr("Set PC"));
2483
2484 QAction *item = menu.exec(globalPos);
2485 if (item == setPc) {
2486 ui->pcregView->setText(addrStr);
2487 debug_set_pc(addr);
2488 disasmUpdateAddr(static_cast<int>(cpu.registers.PC), true);
2489 } else if (item == toggleBreak) {
2490 breakAddGui();
2491 memUpdate();
2492 } else if (item == toggleRead) {
2493 watchAddGuiR();
2494 memUpdate();
2495 } else if (item == toggleWrite) {
2496 watchAddGuiW();
2497 memUpdate();
2498 } else if (item == toggleRw) {
2499 watchAddGuiRW();
2500 memUpdate();
2501 } else if (item == runUntil) {
2502 m_runUntilAddr = addr;
2503 debugToggle();
2504 debugStep(DBG_RUN_UNTIL);
2505 } else if (item == gotoMem) {
2506 gotoMemAddr(addr);
2507 }
2508}
2509
2510void MainWindow::varLaunch(const calc_var_t *prgm) {
2511 keypadBridge->releaseAll();

Callers

nothing calls this directly

Calls 3

hex2intFunction · 0.85
debug_set_pcFunction · 0.85
getSelectedAddrMethod · 0.80

Tested by

no test coverage detected