Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
cbc1854f
Commit
cbc1854f
authored
Nov 16, 2010
by
hjk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debugger: some simplification after engine objects are no more re-used
parent
38428e5f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
51 deletions
+20
-51
src/plugins/debugger/gdb/gdbengine.cpp
src/plugins/debugger/gdb/gdbengine.cpp
+20
-50
src/plugins/debugger/gdb/gdbengine.h
src/plugins/debugger/gdb/gdbengine.h
+0
-1
No files found.
src/plugins/debugger/gdb/gdbengine.cpp
View file @
cbc1854f
...
...
@@ -182,14 +182,28 @@ GdbEngine::GdbEngine(const DebuggerStartParameters &startParameters)
setObjectName
(
QLatin1String
(
"GdbEngine"
));
qRegisterMetaType
<
WatchData
>
(
"WatchData"
);
m_commandTimer
.
setSingleShot
(
true
);
connect
(
&
m_commandTimer
,
SIGNAL
(
timeout
()),
SLOT
(
commandTimeout
()));
// Needs no resetting in initializeVariables()
m_busy
=
false
;
initializeVariables
();
m_gdbAdapter
=
0
;
m_debuggingHelperState
=
DebuggingHelperUninitialized
;
m_gdbVersion
=
100
;
m_gdbBuildVersion
=
-
1
;
m_isMacGdb
=
false
;
m_hasPython
=
false
;
m_registerNamesListed
=
false
;
m_hasInferiorThreadList
=
false
;
m_sourcesListUpdating
=
false
;
m_oldestAcceptableToken
=
-
1
;
m_outputCodec
=
QTextCodec
::
codecForLocale
();
m_pendingWatchRequests
=
0
;
m_pendingBreakpointRequests
=
0
;
m_commandsDoneCallback
=
0
;
invalidateSourcesList
();
m_gdbAdapter
=
createAdapter
();
m_commandTimer
.
setSingleShot
(
true
);
connect
(
&
m_commandTimer
,
SIGNAL
(
timeout
()),
SLOT
(
commandTimeout
()));
connect
(
debuggerCore
()
->
action
(
AutoDerefPointers
),
SIGNAL
(
valueChanged
(
QVariant
)),
SLOT
(
reloadLocals
()));
connect
(
debuggerCore
()
->
action
(
SortStructMembers
),
SIGNAL
(
valueChanged
(
QVariant
)),
...
...
@@ -217,49 +231,6 @@ GdbEngine::~GdbEngine()
m_gdbAdapter
=
0
;
}
void
GdbEngine
::
initializeVariables
()
{
m_debuggingHelperState
=
DebuggingHelperUninitialized
;
m_gdbVersion
=
100
;
m_gdbBuildVersion
=
-
1
;
m_isMacGdb
=
false
;
m_hasPython
=
false
;
m_registerNamesListed
=
false
;
m_hasInferiorThreadList
=
false
;
m_fullToShortName
.
clear
();
m_shortToFullName
.
clear
();
invalidateSourcesList
();
m_sourcesListUpdating
=
false
;
m_oldestAcceptableToken
=
-
1
;
m_outputCodec
=
QTextCodec
::
codecForLocale
();
m_pendingWatchRequests
=
0
;
m_pendingBreakpointRequests
=
0
;
m_commandsDoneCallback
=
0
;
m_commandsToRunOnTemporaryBreak
.
clear
();
m_cookieForToken
.
clear
();
m_pendingConsoleStreamOutput
.
clear
();
m_pendingLogStreamOutput
.
clear
();
m_inbuffer
.
clear
();
m_resultVarName
.
clear
();
m_commandTimer
.
stop
();
// ConverterState has no reset() function.
m_outputCodecState
.
~
ConverterState
();
new
(
&
m_outputCodecState
)
QTextCodec
::
ConverterState
();
m_currentFunctionArgs
.
clear
();
m_currentFrame
.
clear
();
m_dumperHelper
.
clear
();
#ifdef Q_OS_LINUX
m_entryPoint
.
clear
();
#endif
}
QString
GdbEngine
::
errorMessage
(
QProcess
::
ProcessError
error
)
{
switch
(
error
)
{
...
...
@@ -4313,7 +4284,6 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
showStatusMessage(msg);
//m_gdbAdapter->shutdownEngine();
}
initializeVariables();
*/
switch
(
state
())
{
case
EngineShutdownRequested
:
...
...
@@ -4332,9 +4302,9 @@ void GdbEngine::handleGdbFinished(int code, QProcess::ExitStatus type)
tr
(
"The gdb process crashed."
)
:
tr
(
"The gdb process exited unexpectedly (code %1)"
).
arg
(
code
);
showMessageBox
(
QMessageBox
::
Critical
,
tr
(
"Unexpected Gdb Exit"
),
msg
);
}
break
;
}
}
}
void
GdbEngine
::
handleAdapterStartFailed
(
const
QString
&
msg
,
const
QString
&
settingsIdHint
)
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
cbc1854f
...
...
@@ -113,7 +113,6 @@ private: ////////// General Interface //////////
private:
////////// General State //////////
void
initializeVariables
();
DebuggerStartMode
startMode
()
const
;
Q_SLOT
void
reloadLocals
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment