forked from qt-creator/qt-creator
debugger: don't dead-lock when switching sessions while debugging
This commit is contained in:
@@ -1053,6 +1053,15 @@ void DebuggerManager::sessionLoaded()
|
|||||||
loadSessionData();
|
loadSessionData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DebuggerManager::sessionUnloaded()
|
||||||
|
{
|
||||||
|
cleanupViews();
|
||||||
|
if (m_engine)
|
||||||
|
m_engine->shutdown();
|
||||||
|
setStatus(DebuggerProcessNotReady);
|
||||||
|
setBusyCursor(false);
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerManager::aboutToSaveSession()
|
void DebuggerManager::aboutToSaveSession()
|
||||||
{
|
{
|
||||||
saveSessionData();
|
saveSessionData();
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ public slots:
|
|||||||
void updateWatchModel();
|
void updateWatchModel();
|
||||||
|
|
||||||
void sessionLoaded();
|
void sessionLoaded();
|
||||||
|
void sessionUnloaded();
|
||||||
void aboutToSaveSession();
|
void aboutToSaveSession();
|
||||||
|
|
||||||
void assignValueInDebugger();
|
void assignValueInDebugger();
|
||||||
|
|||||||
@@ -752,6 +752,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
m_manager, SLOT(sessionLoaded()));
|
m_manager, SLOT(sessionLoaded()));
|
||||||
connect(sessionManager(), SIGNAL(aboutToSaveSession()),
|
connect(sessionManager(), SIGNAL(aboutToSaveSession()),
|
||||||
m_manager, SLOT(aboutToSaveSession()));
|
m_manager, SLOT(aboutToSaveSession()));
|
||||||
|
connect(sessionManager(), SIGNAL(sessionUnloaded()),
|
||||||
|
m_manager, SLOT(sessionUnloaded()));
|
||||||
|
|
||||||
// EditorManager
|
// EditorManager
|
||||||
QObject *editorManager = core->editorManager();
|
QObject *editorManager = core->editorManager();
|
||||||
|
|||||||
@@ -398,6 +398,10 @@ void GdbEngine::handleResponse(const QByteArray &buff)
|
|||||||
// Archer has "{id="28902"}"
|
// Archer has "{id="28902"}"
|
||||||
} else if (asyncClass == "thread-created") {
|
} else if (asyncClass == "thread-created") {
|
||||||
//"{id="1",group-id="28902"}"
|
//"{id="1",group-id="28902"}"
|
||||||
|
} else if (asyncClass == "thread-group-exited") {
|
||||||
|
// Archer has "{id="28902"}"
|
||||||
|
} else if (asyncClass == "thread-exited") {
|
||||||
|
//"{id="1",group-id="28902"}"
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
} else if (asyncClass == "shlibs-updated") {
|
} else if (asyncClass == "shlibs-updated") {
|
||||||
// MAC announces updated libs
|
// MAC announces updated libs
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ class RegisterHandler : public QAbstractTableModel
|
|||||||
public:
|
public:
|
||||||
RegisterHandler(QObject *parent = 0);
|
RegisterHandler(QObject *parent = 0);
|
||||||
|
|
||||||
void sessionClosed();
|
|
||||||
QAbstractItemModel *model() { return this; }
|
QAbstractItemModel *model() { return this; }
|
||||||
|
|
||||||
bool isEmpty() const; // nothing known so far?
|
bool isEmpty() const; // nothing known so far?
|
||||||
|
|||||||
@@ -996,16 +996,16 @@ void SessionManager::removeProjects(QList<Project *> remove)
|
|||||||
|
|
||||||
void SessionManager::setValue(const QString &name, const QVariant &value)
|
void SessionManager::setValue(const QString &name, const QVariant &value)
|
||||||
{
|
{
|
||||||
m_file->m_values.insert(name, value);
|
if (m_file)
|
||||||
|
m_file->m_values.insert(name, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant SessionManager::value(const QString &name)
|
QVariant SessionManager::value(const QString &name)
|
||||||
{
|
{
|
||||||
QMap<QString, QVariant>::const_iterator it = m_file->m_values.find(name);
|
if (!m_file)
|
||||||
if (it != m_file->m_values.constEnd())
|
|
||||||
return *it;
|
|
||||||
else
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
QMap<QString, QVariant>::const_iterator it = m_file->m_values.find(name);
|
||||||
|
return (it == m_file->m_values.constEnd()) ? QVariant() : *it;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SessionManager::activeSession() const
|
QString SessionManager::activeSession() const
|
||||||
|
|||||||
Reference in New Issue
Block a user