From d0e419e02b399dd48cdbe0c38f9b1b1d246eb8e4 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 5 Oct 2017 08:53:23 +0200 Subject: [PATCH] Debugger: Move some CdbEngine member initialization More concise. Change-Id: I28ac441cacfceef1ad5622f15fecac1d2cca9395 Reviewed-by: David Schulz --- src/plugins/debugger/cdb/cdbengine.cpp | 17 +-------------- src/plugins/debugger/cdb/cdbengine.h | 30 +++++++++++++------------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 90bfd325c83..a50fa1f7ca1 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -212,22 +212,7 @@ void addCdbOptionPages(QList *opts) CdbEngine::CdbEngine() : m_tokenPrefix(""), - m_effectiveStartMode(NoStartMode), - m_accessible(false), - m_specialStopMode(NoSpecialStop), - m_nextCommandToken(0), - m_currentBuiltinResponseToken(-1), - m_extensionCommandPrefix("!" QT_CREATOR_CDB_EXT "."), - m_operateByInstructionPending(true), - m_operateByInstruction(true), // Default CDB setting - m_hasDebuggee(false), - m_wow64State(wow64Uninitialized), - m_elapsedLogTime(0), - m_sourceStepInto(false), - m_watchPointX(0), - m_watchPointY(0), - m_autoBreakPointCorrection(false), - m_ignoreCdbOutput(false) + m_extensionCommandPrefix("!" QT_CREATOR_CDB_EXT ".") { setObjectName("CdbEngine"); diff --git a/src/plugins/debugger/cdb/cdbengine.h b/src/plugins/debugger/cdb/cdbengine.h index 7a80e48dbac..0a8b6f50245 100644 --- a/src/plugins/debugger/cdb/cdbengine.h +++ b/src/plugins/debugger/cdb/cdbengine.h @@ -224,40 +224,40 @@ private: QProcess m_process; QScopedPointer m_consoleStub; - DebuggerStartMode m_effectiveStartMode; + DebuggerStartMode m_effectiveStartMode = NoStartMode; QByteArray m_outputBuffer; //! Debugger accessible (expecting commands) - bool m_accessible; - SpecialStopMode m_specialStopMode; + bool m_accessible = false; + SpecialStopMode m_specialStopMode = NoSpecialStop; ProjectExplorer::DeviceProcessSignalOperation::Ptr m_signalOperation; - int m_nextCommandToken; + int m_nextCommandToken = 0; QHash m_commandForToken; QString m_currentBuiltinResponse; - int m_currentBuiltinResponseToken; + int m_currentBuiltinResponseToken = -1; QMap m_normalizedFileCache; const QString m_extensionCommandPrefix; //!< Library name used as prefix - bool m_operateByInstructionPending; //!< Creator operate by instruction action changed. - bool m_operateByInstruction; - bool m_hasDebuggee; + bool m_operateByInstructionPending = true; //!< Creator operate by instruction action changed. + bool m_operateByInstruction = true; // Default CDB setting. + bool m_hasDebuggee = false; enum Wow64State { wow64Uninitialized, noWow64Stack, wow64Stack32Bit, wow64Stack64Bit - } m_wow64State; + } m_wow64State = wow64Uninitialized; QTime m_logTime; - mutable int m_elapsedLogTime; + mutable int m_elapsedLogTime = 0; QString m_extensionMessageBuffer; - bool m_sourceStepInto; - int m_watchPointX; - int m_watchPointY; + bool m_sourceStepInto = false; + int m_watchPointX = 0; + int m_watchPointY = 0; PendingBreakPointMap m_pendingBreakpointMap; PendingBreakPointMap m_insertSubBreakpointMap; PendingBreakPointMap m_pendingSubBreakpointMap; - bool m_autoBreakPointCorrection; + bool m_autoBreakPointCorrection = false; QHash m_fileNameModuleHash; QMultiHash m_symbolAddressCache; - bool m_ignoreCdbOutput; + bool m_ignoreCdbOutput = false; QVariantList m_customSpecialStopData; QList m_sourcePathMappings; QScopedPointer m_coreStopReason;