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
eb83377f
Commit
eb83377f
authored
Jul 06, 2009
by
hjk
Browse files
debugger: enhance time logging for individual commands
parent
09a4409c
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/gdbengine.cpp
View file @
eb83377f
...
...
@@ -738,6 +738,7 @@ void GdbEngine::postCommand(const QString &command, GdbCommandFlags flags,
void
GdbEngine
::
flushCommand
(
GdbCommand
&
cmd
)
{
++
currentToken
();
cmd
.
postTime
=
QTime
::
currentTime
();
m_cookieForToken
[
currentToken
()]
=
cmd
;
cmd
.
command
=
QString
::
number
(
currentToken
())
+
cmd
.
command
;
if
(
cmd
.
flags
&
EmbedToken
)
...
...
@@ -761,6 +762,11 @@ void GdbEngine::handleResultRecord(const GdbResultRecord &record)
return
;
GdbCommand
cmd
=
m_cookieForToken
.
take
(
token
);
if
(
theDebuggerBoolSetting
(
LogTimeStamps
))
{
emit
gdbOutputAvailable
(
LogTime
,
_
(
"Response time: %1: %2 s"
)
.
arg
(
cmd
.
command
)
.
arg
(
cmd
.
postTime
.
msecsTo
(
QTime
::
currentTime
())
/
1000.
));
}
if
(
record
.
token
<
m_oldestAcceptableToken
&&
(
cmd
.
flags
&
Discardable
))
{
//qDebug() << "### SKIPPING OLD RESULT" << record.toString();
...
...
src/plugins/debugger/gdb/gdbengine.h
View file @
eb83377f
...
...
@@ -44,6 +44,7 @@
#include <QtCore/QProcess>
#include <QtCore/QPoint>
#include <QtCore/QTextCodec>
#include <QtCore/QTime>
#include <QtCore/QVariant>
QT_BEGIN_NAMESPACE
...
...
@@ -164,6 +165,7 @@ private:
const
char
*
callbackName
;
QString
command
;
QVariant
cookie
;
QTime
postTime
;
};
// type and cookie are sender-internal data, opaque for the "event
...
...
tests/manual/gdbdebugger/simple/app.cpp
View file @
eb83377f
...
...
@@ -1275,4 +1275,4 @@ struct QMetaTypeId< QMap<uint, QStringList> >
return
metatype_id
;
\
}
\
};
QT_END_NAMESPACE
\ No newline at end of file
QT_END_NAMESPACE
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