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
Tobias Hunger
qt-creator
Commits
839ad4da
Commit
839ad4da
authored
Mar 02, 2010
by
hjk
Browse files
debugger: rename some watch-update related variables to prepare a similar
mechanism for breakpoints.
parent
f6447d5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/classicgdbengine.cpp
View file @
839ad4da
...
...
@@ -143,7 +143,7 @@ void GdbEngine::runDirectDebuggingHelperClassic(const WatchData &data, bool dump
var
.
setValue
(
data
);
postCommand
(
cmd
,
WatchUpdate
,
CB
(
handleDebuggingHelperValue3Classic
),
var
);
showStatusMessage
(
msgRetrievingWatchData
(
m_pendingRequests
+
1
),
10000
);
showStatusMessage
(
msgRetrievingWatchData
(
m_pending
Watch
Requests
+
1
),
10000
);
}
void
GdbEngine
::
runDebuggingHelperClassic
(
const
WatchData
&
data0
,
bool
dumpChildren
)
...
...
@@ -195,7 +195,7 @@ void GdbEngine::runDebuggingHelperClassic(const WatchData &data0, bool dumpChild
postCommand
(
cmd
.
toLatin1
(),
WatchUpdate
|
NonCriticalResponse
);
showStatusMessage
(
msgRetrievingWatchData
(
m_pendingRequests
+
1
),
10000
);
showStatusMessage
(
msgRetrievingWatchData
(
m_pending
Watch
Requests
+
1
),
10000
);
// retrieve response
postCommand
(
"p (char*)&qDumpOutBuffer"
,
WatchUpdate
,
...
...
@@ -394,7 +394,7 @@ void GdbEngine::handleDebuggingHelperValue2Classic(const GdbResponse &response)
if
(
m_cookieForToken
.
contains
(
response
.
token
-
1
))
{
m_cookieForToken
.
remove
(
response
.
token
-
1
);
debugMessage
(
_
(
"DETECTING LOST COMMAND %1"
).
arg
(
response
.
token
-
1
));
--
m_pendingRequests
;
--
m_pending
Watch
Requests
;
data
.
setError
(
WatchData
::
msgNotInScope
());
insertData
(
data
);
return
;
...
...
src/plugins/debugger/gdb/gdbengine.cpp
View file @
839ad4da
...
...
@@ -258,7 +258,7 @@ void GdbEngine::initializeVariables()
m_breakListUpdating
=
false
;
m_oldestAcceptableToken
=
-
1
;
m_outputCodec
=
QTextCodec
::
codecForLocale
();
m_pendingRequests
=
0
;
m_pending
Watch
Requests
=
0
;
m_commandsDoneCallback
=
0
;
m_commandsToRunOnTemporaryBreak
.
clear
();
m_cookieForToken
.
clear
();
...
...
@@ -717,13 +717,13 @@ void GdbEngine::postCommandHelper(const GdbCommand &cmd)
return
;
}
if
(
cmd
.
flags
&
RebuildModel
)
{
++
m_pendingRequests
;
if
(
cmd
.
flags
&
Rebuild
Watch
Model
)
{
++
m_pending
Watch
Requests
;
PENDING_DEBUG
(
" MODEL:"
<<
cmd
.
command
<<
"=>"
<<
cmd
.
callbackName
<<
"INCREMENTS PENDING TO"
<<
m_pendingRequests
);
<<
"INCREMENTS PENDING TO"
<<
m_pending
Watch
Requests
);
}
else
{
PENDING_DEBUG
(
" OTHER (IN):"
<<
cmd
.
command
<<
"=>"
<<
cmd
.
callbackName
<<
"LEAVES PENDING AT"
<<
m_pendingRequests
);
<<
"LEAVES PENDING AT"
<<
m_pending
Watch
Requests
);
}
if
((
cmd
.
flags
&
NeedsStop
)
||
!
m_commandsToRunOnTemporaryBreak
.
isEmpty
())
{
...
...
@@ -939,17 +939,17 @@ void GdbEngine::handleResultRecord(GdbResponse *response)
(
m_gdbAdapter
->*
cmd
.
adapterCallback
)(
*
response
);
}
if
(
cmd
.
flags
&
RebuildModel
)
{
--
m_pendingRequests
;
if
(
cmd
.
flags
&
Rebuild
Watch
Model
)
{
--
m_pending
Watch
Requests
;
PENDING_DEBUG
(
" WATCH"
<<
cmd
.
command
<<
"=>"
<<
cmd
.
callbackName
<<
"DECREMENTS PENDING TO"
<<
m_pendingRequests
);
if
(
m_pendingRequests
<=
0
)
{
<<
"DECREMENTS PENDING TO"
<<
m_pending
Watch
Requests
);
if
(
m_pending
Watch
Requests
<=
0
)
{
PENDING_DEBUG
(
"
\n\n
... AND TRIGGERS MODEL UPDATE
\n
"
);
rebuildModel
();
rebuild
Watch
Model
();
}
}
else
{
PENDING_DEBUG
(
" OTHER (OUT):"
<<
cmd
.
command
<<
"=>"
<<
cmd
.
callbackName
<<
"LEAVES PENDING AT"
<<
m_pendingRequests
);
<<
"LEAVES PENDING AT"
<<
m_pending
Watch
Requests
);
}
// Commands were queued, but we were in RunningRequested state, so the interrupt
...
...
@@ -3189,8 +3189,8 @@ void GdbEngine::updateWatchData(const WatchData &data)
}
else
{
// Bump requests to avoid model rebuilding during the nested
// updateWatchModel runs.
++
m_pendingRequests
;
PENDING_DEBUG
(
"UPDATE WATCH BUMPS PENDING UP TO "
<<
m_pendingRequests
);
++
m_pending
Watch
Requests
;
PENDING_DEBUG
(
"UPDATE WATCH BUMPS PENDING UP TO "
<<
m_pending
Watch
Requests
);
#if 1
QMetaObject
::
invokeMethod
(
this
,
"updateWatchDataHelper"
,
Qt
::
QueuedConnection
,
Q_ARG
(
WatchData
,
data
));
...
...
@@ -3212,13 +3212,13 @@ void GdbEngine::updateWatchDataHelper(const WatchData &data)
updateSubItemClassic
(
data
);
//PENDING_DEBUG("INTERNAL TRIGGERING UPDATE WATCH MODEL");
--
m_pendingRequests
;
PENDING_DEBUG
(
"UPDATE WATCH DONE BUMPS PENDING DOWN TO "
<<
m_pendingRequests
);
if
(
m_pendingRequests
<=
0
)
rebuildModel
();
--
m_pending
Watch
Requests
;
PENDING_DEBUG
(
"UPDATE WATCH DONE BUMPS PENDING DOWN TO "
<<
m_pending
Watch
Requests
);
if
(
m_pending
Watch
Requests
<=
0
)
rebuild
Watch
Model
();
}
void
GdbEngine
::
rebuildModel
()
void
GdbEngine
::
rebuild
Watch
Model
()
{
static
int
count
=
0
;
++
count
;
...
...
@@ -3417,7 +3417,7 @@ void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item,
void
GdbEngine
::
updateLocals
(
const
QVariant
&
cookie
)
{
m_pendingRequests
=
0
;
m_pending
Watch
Requests
=
0
;
if
(
hasPython
())
updateLocalsPython
(
QByteArray
());
else
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
839ad4da
...
...
@@ -174,8 +174,8 @@ private: ////////// Gdb Command Management //////////
NoFlags
=
0
,
NeedsStop
=
1
,
// The command needs a stopped inferior
Discardable
=
2
,
// No need to wait for the reply before continuing inferior
RebuildModel
=
4
,
// Trigger model rebuild when no such commands are pending any more
WatchUpdate
=
Discardable
|
RebuildModel
,
Rebuild
Watch
Model
=
4
,
// Trigger model rebuild when no such commands are pending any more
WatchUpdate
=
Discardable
|
Rebuild
Watch
Model
,
NonCriticalResponse
=
8
,
// We can live without recieving an answer
RunRequest
=
16
,
// Callback expects GdbResultRunning instead of GdbResultDone
ExitRequest
=
32
,
// Callback expects GdbResultExit instead of GdbResultDone
...
...
@@ -244,7 +244,7 @@ private: ////////// Gdb Command Management //////////
// out of date and discarded.
int
m_oldestAcceptableToken
;
int
m_pendingRequests
;
// Watch updating commands in flight
int
m_pending
Watch
Requests
;
// Watch updating commands in flight
typedef
void
(
GdbEngine
::*
CommandsDoneCallback
)();
// function called after all previous responses have been received
...
...
@@ -442,7 +442,7 @@ private: ////////// View & Data Stuff //////////
void
virtual
updateWatchData
(
const
WatchData
&
data
);
Q_SLOT
void
updateWatchDataHelper
(
const
WatchData
&
data
);
void
rebuildModel
();
void
rebuild
Watch
Model
();
bool
showToolTip
();
void
insertData
(
const
WatchData
&
data
);
...
...
src/plugins/debugger/gdb/pythongdbengine.cpp
View file @
839ad4da
...
...
@@ -179,9 +179,9 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
//PENDING_DEBUG("AFTER handleStackFrame()");
// FIXME: This should only be used when updateLocals() was
// triggered by expanding an item in the view.
if
(
m_pendingRequests
<=
0
)
{
if
(
m_pending
Watch
Requests
<=
0
)
{
//PENDING_DEBUG("\n\n .... AND TRIGGERS MODEL UPDATE\n");
rebuildModel
();
rebuild
Watch
Model
();
}
}
else
{
debugMessage
(
_
(
"DUMPER FAILED: "
+
response
.
toString
()));
...
...
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