void BreakpointDockWidget::updateTargetMachine(QString /*target*/) { QObject* breakpointWatcher = CObjectRegistry::getObject("Breakpoint Watcher"); QObject* emulator = CObjectRegistry::getObject("Emulator"); QObject::connect(breakpointWatcher,SIGNAL(breakpointHit()),this,SLOT(updateData()) ); QObject::connect(breakpointWatcher,SIGNAL(breakpointHit()),model,SLOT(update())); if ( emulator ) { QObject::connect(emulator,SIGNAL(machineReady()),model,SLOT(update())); QObject::connect(emulator,SIGNAL(emulatorReset()),model,SLOT(update())); QObject::connect(emulator,SIGNAL(emulatorPaused(bool)),model,SLOT(update())); QObject::connect(emulator,SIGNAL(emulatorStarted()),model,SLOT(update())); QObject::connect(this,SIGNAL(breakpointsChanged()),emulator,SLOT(breakpointsChanged())); } }
void NameTableVisualizerDockWidget::updateTargetMachine(QString /*target*/) { QObject* breakpointWatcher = CObjectRegistry::getObject("Breakpoint Watcher"); QObject* emulator = CObjectRegistry::getObject("Emulator"); QObject::connect(emulator,SIGNAL(machineReady()),pThread,SLOT(updateDebuggers())); QObject::connect(emulator,SIGNAL(emulatorReset()),pThread,SLOT(updateDebuggers())); QObject::connect(emulator,SIGNAL(emulatorPaused(bool)),pThread,SLOT(updateDebuggers())); QObject::connect(breakpointWatcher,SIGNAL(breakpointHit()),pThread,SLOT(updateDebuggers())); }
void Run::debuggerNoticeOnBreakpointHit(const String &filename, const quint32 lineNo) { stepDoneMutex_->lock(); stepDoneFlag_ = true; stepDoneMutex_->unlock(); breakHitMutex_->lock(); breakHitFlag_ = true; ignoreLineChangeFlag_ = true; breakHitMutex_->unlock(); _runMode = Shared::RunInterface::RM_StepOver; vm->setNextCallStepOver(); emit breakpointHit(QString::fromStdWString(filename), lineNo); }
/** * Handles breakpoint hits. * * @param address The corrected address of the breakpoint event. * * @return A NaviError code that describes whether the operation was successful * or not. */ NaviError GdbSystem::handleBreakpointHit(CPUADDRESS address) { char tmp[50]; #ifdef WIN32 sprintf_s(tmp, ADDRESS_FORMAT_MASK, address); #else sprintf(tmp, ADDRESS_FORMAT_MASK, address); #endif msglog->log(LOG_VERBOSE, "Breakpoint exception at offset %s", tmp); std::vector < Thread > tids; NaviError threadResult = cpu->getThreads(tids, this); if (threadResult) { msglog->log(LOG_ALWAYS, "Error: Unable to determine threads (Code %d)", threadResult); return threadResult; } NaviError hitResult; // TODO: mega crap code!!! if (tids.size()) { hitResult = breakpointHit(tmp, tids[0].tid); } else { hitResult = breakpointHit(tmp, 0); } if (hitResult) { msglog->log(LOG_ALWAYS, "Error: Breakpoint handler failed (Code %d)", hitResult); return hitResult; } return hitResult; }
SourceNavigator::SourceNavigator(QWidget *parent) : QWidget(parent), ui(new Ui::SourceNavigator) { ui->setupUi(this); ui->files->setEnabled(false); ui->symbols->setEnabled(false); ui->symbols->completer()->setCompletionMode(QCompleter::PopupCompletion); m_loadedTarget = "none"; QObject* compiler = CObjectRegistry::getObject("Compiler"); QObject* breakpointWatcher = CObjectRegistry::getObject("Breakpoint Watcher"); QObject::connect(compiler,SIGNAL(compileDone(bool)),this,SLOT(compiler_compileDone(bool))); QObject::connect(breakpointWatcher,SIGNAL(breakpointHit()),this,SLOT(emulator_emulatorPaused())); }