Commit c09ebb8f authored by hjk's avatar hjk

Debugger: Re-enable retrieval of register content

Less use of magical object names.

Change-Id: I2da17f1cefe1a72f4ea8be4c041e7443265def93
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 0f066bd3
......@@ -2008,9 +2008,9 @@ void CdbEngine::processStop(const GdbMi &stopReason, bool conditionalBreakPointT
// Fire off remaining commands asynchronously
if (!m_pendingBreakpointMap.isEmpty() && !m_pendingSubBreakpointMap.isEmpty())
listBreakpoints();
if (Internal::isDockVisible(QLatin1String(DOCKWIDGET_REGISTER)))
if (Internal::isRegistersWindowVisible())
reloadRegisters();
if (Internal::isDockVisible(QLatin1String(DOCKWIDGET_MODULES)))
if (Internal::isModulesWindowVisible())
reloadModules();
}
// After the sequence has been sent off and CDB is pondering the commands,
......
......@@ -77,7 +77,8 @@ void displayDebugger(DebuggerEngine *engine, bool updateEngine);
void synchronizeBreakpoints();
QWidget *mainWindow();
bool isDockVisible(const QString &objectName);
bool isRegistersWindowVisible();
bool isModulesWindowVisible();
void showModuleSymbols(const QString &moduleName, const QVector<Internal::Symbol> &symbols);
void showModuleSections(const QString &moduleName, const QVector<Internal::Section> &sections);
void openMemoryEditor();
......
......@@ -3128,10 +3128,14 @@ QWidget *mainWindow()
return dd->m_mainWindow;
}
bool isDockVisible(const QString &objectName)
bool isRegistersWindowVisible()
{
QDockWidget *dock = dd->findChild<QDockWidget *>(objectName);
return dock && dock->toggleViewAction()->isChecked();
return dd->m_registerWindow->isVisible();
}
bool isModulesWindowVisible()
{
return dd->m_modulesWindow->isVisible();
}
void openMemoryEditor()
......
......@@ -3445,7 +3445,7 @@ void GdbEngine::handleMakeSnapshot(const DebuggerResponse &response, const QStri
void GdbEngine::reloadRegisters()
{
if (!Internal::isDockVisible(_(DOCKWIDGET_REGISTER)))
if (!Internal::isRegistersWindowVisible())
return;
if (state() != InferiorStopOk && state() != InferiorUnrunnable)
......
......@@ -956,7 +956,7 @@ void LldbEngine::handleLocationNotification(const GdbMi &reportedLocation)
void LldbEngine::reloadRegisters()
{
if (!Internal::isDockVisible(QLatin1String(DOCKWIDGET_REGISTER)))
if (!Internal::isRegistersWindowVisible())
return;
DebuggerCommand cmd("fetchRegisters");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment