forked from qt-creator/qt-creator
CDB: Fix messages displayed after stop of Debugger.
Reviewed-by: hjk Task-number: QTCREATORBUG-399
This commit is contained in:
@@ -655,7 +655,7 @@ void CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters>
|
|||||||
m_d->m_dumper->reset(dumperLibName, dumperEnabled);
|
m_d->m_dumper->reset(dumperLibName, dumperEnabled);
|
||||||
|
|
||||||
setState(InferiorStarting, Q_FUNC_INFO, __LINE__);
|
setState(InferiorStarting, Q_FUNC_INFO, __LINE__);
|
||||||
manager()->showStatusMessage("Starting Debugger", -1);
|
manager()->showStatusMessage("Starting Debugger", messageTimeOut);
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
bool rc = false;
|
bool rc = false;
|
||||||
@@ -692,7 +692,6 @@ void CdbDebugEngine::startDebugger(const QSharedPointer<DebuggerStartParameters>
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rc) {
|
if (rc) {
|
||||||
manager()->showStatusMessage(tr("Debugger running"), -1);
|
|
||||||
if (needWatchTimer)
|
if (needWatchTimer)
|
||||||
startWatchTimer();
|
startWatchTimer();
|
||||||
emit startSuccessful();
|
emit startSuccessful();
|
||||||
@@ -732,8 +731,6 @@ bool CdbDebugEngine::startAttachDebugger(qint64 pid, DebuggerStartMode sm, QStri
|
|||||||
|
|
||||||
bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *errorMessage)
|
bool CdbDebugEngine::startDebuggerWithExecutable(DebuggerStartMode sm, QString *errorMessage)
|
||||||
{
|
{
|
||||||
showStatusMessage("Starting Debugger", -1);
|
|
||||||
|
|
||||||
DEBUG_CREATE_PROCESS_OPTIONS dbgopts;
|
DEBUG_CREATE_PROCESS_OPTIONS dbgopts;
|
||||||
memset(&dbgopts, 0, sizeof(dbgopts));
|
memset(&dbgopts, 0, sizeof(dbgopts));
|
||||||
dbgopts.CreateFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
|
dbgopts.CreateFlags = DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS;
|
||||||
@@ -1190,7 +1187,7 @@ bool CdbDebugEnginePrivate::continueInferior(QString *errorMessage)
|
|||||||
setCodeLevel();
|
setCodeLevel();
|
||||||
m_engine->killWatchTimer();
|
m_engine->killWatchTimer();
|
||||||
manager()->resetLocation();
|
manager()->resetLocation();
|
||||||
manager()->showStatusMessage(CdbDebugEngine::tr("Running requested..."), 5000);
|
manager()->showStatusMessage(CdbDebugEngine::tr("Running requested..."), messageTimeOut);
|
||||||
|
|
||||||
if (!continueInferiorProcess(errorMessage))
|
if (!continueInferiorProcess(errorMessage))
|
||||||
break;
|
break;
|
||||||
|
@@ -194,6 +194,8 @@ const char *executionStatusString(CIDebugControl *ctl);
|
|||||||
QString msgDebugEngineComResult(HRESULT hr);
|
QString msgDebugEngineComResult(HRESULT hr);
|
||||||
QString msgComFailed(const char *func, HRESULT hr);
|
QString msgComFailed(const char *func, HRESULT hr);
|
||||||
|
|
||||||
|
enum { messageTimeOut = 5000 };
|
||||||
|
|
||||||
enum { debugCDB = 0 };
|
enum { debugCDB = 0 };
|
||||||
enum { debugCDBExecution = 0 };
|
enum { debugCDBExecution = 0 };
|
||||||
enum { debugCDBWatchHandling = 0 };
|
enum { debugCDBWatchHandling = 0 };
|
||||||
|
@@ -288,13 +288,13 @@ bool CdbDumperInitThread::ensureDumperInitialized(CdbDumperHelper &h, QString *e
|
|||||||
eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
|
eventLoop.exec(QEventLoop::ExcludeUserInputEvents);
|
||||||
QApplication::restoreOverrideCursor();
|
QApplication::restoreOverrideCursor();
|
||||||
if (thread.m_ok) {
|
if (thread.m_ok) {
|
||||||
h.m_manager->showStatusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Stopped / Custom dumper library initialized."), -1);
|
h.m_manager->showStatusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Stopped / Custom dumper library initialized."), messageTimeOut);
|
||||||
h.m_manager->showDebuggerOutput(LogMisc, h.m_helper.toString());
|
h.m_manager->showDebuggerOutput(LogMisc, h.m_helper.toString());
|
||||||
h.m_state = CdbDumperHelper::Initialized;
|
h.m_state = CdbDumperHelper::Initialized;
|
||||||
} else {
|
} else {
|
||||||
h.m_state = CdbDumperHelper::Disabled; // No message here
|
h.m_state = CdbDumperHelper::Disabled; // No message here
|
||||||
*errorMessage = QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "The custom dumper library could not be initialized: %1").arg(*errorMessage);
|
*errorMessage = QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "The custom dumper library could not be initialized: %1").arg(*errorMessage);
|
||||||
h.m_manager->showStatusMessage(*errorMessage, -1);
|
h.m_manager->showStatusMessage(*errorMessage, messageTimeOut);
|
||||||
h.m_manager->showQtDumperLibraryWarning(*errorMessage);
|
h.m_manager->showQtDumperLibraryWarning(*errorMessage);
|
||||||
}
|
}
|
||||||
if (loadDebug)
|
if (loadDebug)
|
||||||
@@ -332,7 +332,7 @@ void CdbDumperInitThread ::run()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Perform remaining initialization
|
// Perform remaining initialization
|
||||||
emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), -1);
|
emit statusMessage(QCoreApplication::translate("Debugger::Internal::CdbDumperHelper", "Initializing dumpers..."), 60000);
|
||||||
m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage);
|
m_ok = m_helper.initResolveSymbols(m_errorMessage) && m_helper.initKnownTypes(m_errorMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ void CdbDumperHelper::moduleLoadHook(const QString &module, HANDLE debuggeeHandl
|
|||||||
// for the thread to finish as this would lock up.
|
// for the thread to finish as this would lock up.
|
||||||
if (m_tryInjectLoad && module.contains(QLatin1String("Qt"), Qt::CaseInsensitive)) {
|
if (m_tryInjectLoad && module.contains(QLatin1String("Qt"), Qt::CaseInsensitive)) {
|
||||||
// Also shows up in the log window.
|
// Also shows up in the log window.
|
||||||
m_manager->showStatusMessage(msgLoading(m_library, true), 10000);
|
m_manager->showStatusMessage(msgLoading(m_library, true), messageTimeOut);
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
SharedLibraryInjector sh(GetProcessId(debuggeeHandle));
|
SharedLibraryInjector sh(GetProcessId(debuggeeHandle));
|
||||||
if (sh.remoteInject(m_library, false, &errorMessage)) {
|
if (sh.remoteInject(m_library, false, &errorMessage)) {
|
||||||
|
Reference in New Issue
Block a user