| 2006 | } |
| 2007 | |
| 2008 | HexWidget *MainWindow::gotoMemAddrNoRaise(uint32_t address) { |
| 2009 | HexWidget *memWidget = m_memWidget; |
| 2010 | bool didGoto = false; |
| 2011 | if (memWidget == Q_NULLPTR && !ui->debugMemoryWidget->isVisible()) { |
| 2012 | memWidget = firstMemWidget(); |
| 2013 | } |
| 2014 | if (memWidget == Q_NULLPTR) { |
| 2015 | for (HexWidget *edit : ui->debugMemoryWidget->findChildren<HexWidget*>()) { |
| 2016 | uint32_t offset = address - edit->getBase(); |
| 2017 | if (offset < edit->getSize()) { |
| 2018 | edit->setOffset(offset); |
| 2019 | memWidget = edit; |
| 2020 | didGoto = true; |
| 2021 | break; |
| 2022 | } |
| 2023 | } |
| 2024 | if (!didGoto) { |
| 2025 | if (m_docksMemory.isEmpty() && m_uiEditMode) { |
| 2026 | addMemDock(randomString(20), 8, true); |
| 2027 | } |
| 2028 | memWidget = firstMemWidget(); |
| 2029 | } |
| 2030 | } |
| 2031 | if (memWidget != Q_NULLPTR && !didGoto) { |
| 2032 | memGoto(memWidget, address); |
| 2033 | } |
| 2034 | return memWidget; |
| 2035 | } |
| 2036 | |
| 2037 | QAction *MainWindow::gotoMemAction(QMenu *menu, bool vat) { |
| 2038 | QAction *gotoMem = menu->addAction(vat ? ACTION_GOTO_VAT_MEMORY_VIEW : ACTION_GOTO_MEMORY_VIEW); |
nothing calls this directly
no test coverage detected