Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
3d9c65f2
Commit
3d9c65f2
authored
Jun 29, 2009
by
hjk
Browse files
debugger: clear more status variables in initializeVariables() to
prevent inter-session dependencies
parent
8f2d0094
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/gdbengine.cpp
View file @
3d9c65f2
...
...
@@ -111,13 +111,13 @@ static int ¤tToken()
GdbEngine
::
GdbEngine
(
DebuggerManager
*
parent
)
:
#ifdef Q_OS_WIN // Do injection loading with MinGW (call loading does not work with 64bit)
m_dumperInjectionLoad
(
true
)
m_dumperInjectionLoad
(
true
)
,
#else
m_dumperInjectionLoad
(
false
)
m_dumperInjectionLoad
(
false
)
,
#endif
q
(
parent
),
qq
(
parent
->
engineInterface
())
{
q
=
parent
;
qq
=
parent
->
engineInterface
();
m_stubProc
.
setMode
(
Core
::
Utils
::
ConsoleProcess
::
Debug
);
#ifdef Q_OS_UNIX
m_stubProc
.
setSettings
(
Core
::
ICore
::
instance
()
->
settings
());
...
...
@@ -199,6 +199,25 @@ void GdbEngine::initializeVariables()
m_waitingForFirstBreakpointToBeHit
=
false
;
m_commandsToRunOnTemporaryBreak
.
clear
();
m_cookieForToken
.
clear
();
m_customOutputForToken
.
clear
();
m_pendingConsoleStreamOutput
.
clear
();
m_pendingTargetStreamOutput
.
clear
();
m_pendingLogStreamOutput
.
clear
();
m_inbuffer
.
clear
();
m_address
.
clear
();
m_currentFunctionArgs
.
clear
();
m_currentFrame
.
clear
();
m_dumperHelper
=
QtDumperHelper
();
// FIXME: unhandled:
//m_outputCodecState = QTextCodec::ConverterState();
//OutputCollector m_outputCollector;
//QProcess m_gdbProc;
//QProcess m_uploadProc;
//Core::Utils::ConsoleProcess m_stubProc;
}
void
GdbEngine
::
gdbProcError
(
QProcess
::
ProcessError
error
)
...
...
@@ -3458,7 +3477,8 @@ void GdbEngine::handleDebuggingHelperValue3(const GdbResultRecord &record,
void
GdbEngine
::
updateLocals
()
{
// Asynchronous load of injected library, initialize in first stop
if
(
m_dumperInjectionLoad
&&
m_debuggingHelperState
==
DebuggingHelperLoadTried
&&
m_dumperHelper
.
typeCount
()
==
0
if
(
m_dumperInjectionLoad
&&
m_debuggingHelperState
==
DebuggingHelperLoadTried
&&
m_dumperHelper
.
typeCount
()
==
0
&&
q
->
inferiorPid
()
>
0
)
tryQueryDebuggingHelpers
();
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
3d9c65f2
...
...
@@ -242,7 +242,6 @@ private:
QByteArray
m_pendingConsoleStreamOutput
;
QByteArray
m_pendingTargetStreamOutput
;
QByteArray
m_pendingLogStreamOutput
;
//QString m_pwd;
// contains the first token number for the current round
// of evaluation. Responses with older tokens are considers
...
...
@@ -364,7 +363,6 @@ private:
bool
startModeAllowsDumpers
()
const
;
QString
m_editedData
;
int
m_pendingRequests
;
QtDumperHelper
m_dumperHelper
;
...
...
@@ -380,8 +378,9 @@ private:
QList
<
GdbCommand
>
m_commandsToRunOnTemporaryBreak
;
DebuggerManager
*
q
;
IDebuggerManagerAccessForEngines
*
qq
;
DebuggerManager
*
const
q
;
IDebuggerManagerAccessForEngines
*
const
qq
;
// make sure to re-initialize new members in initializeVariables();
};
}
// namespace Internal
...
...
src/plugins/debugger/watchutils.cpp
View file @
3d9c65f2
...
...
@@ -557,8 +557,9 @@ void QtDumperHelper::TypeData::clear()
}
// ----------------- QtDumperHelper
const
QString
stdAllocatorPrefix
=
QLatin1String
(
"std::allocator"
);
QtDumperHelper
::
QtDumperHelper
()
:
m_stdAllocatorPrefix
(
QLatin1String
(
"std::allocator"
)),
m_intSize
(
0
),
m_pointerSize
(
0
),
m_stdAllocatorSize
(
0
),
...
...
@@ -1053,7 +1054,7 @@ void QtDumperHelper::addSize(const QString &name, int size)
m_intSize
=
size
;
break
;
}
if
(
name
.
startsWith
(
m_
stdAllocatorPrefix
))
{
if
(
name
.
startsWith
(
stdAllocatorPrefix
))
{
m_stdAllocatorSize
=
size
;
break
;
}
...
...
@@ -1103,7 +1104,7 @@ QString QtDumperHelper::evaluationSizeofTypeExpression(const QString &typeName,
// Look up fixed types
if
(
m_pointerSize
&&
isPointerType
(
typeName
))
return
QString
::
number
(
m_pointerSize
);
if
(
m_stdAllocatorSize
&&
typeName
.
startsWith
(
m_
stdAllocatorPrefix
))
if
(
m_stdAllocatorSize
&&
typeName
.
startsWith
(
stdAllocatorPrefix
))
return
QString
::
number
(
m_stdAllocatorSize
);
const
SizeCache
::
const_iterator
sit
=
m_sizeCache
.
constFind
(
typeName
);
if
(
sit
!=
m_sizeCache
.
constEnd
())
...
...
src/plugins/debugger/watchutils.h
View file @
3d9c65f2
...
...
@@ -212,8 +212,6 @@ private:
static
Type
specialType
(
QString
s
);
QString
evaluationSizeofTypeExpression
(
const
QString
&
typeName
,
Debugger
d
)
const
;
const
QString
m_stdAllocatorPrefix
;
NameTypeMap
m_nameTypeMap
;
SizeCache
m_sizeCache
;
int
m_intSize
;
...
...
Write
Preview
Supports
Markdown
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