Skip to content
GitLab
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
8dd627a2
Commit
8dd627a2
authored
Apr 16, 2010
by
ck
Browse files
Maemo: When debugging, print gdbserver and application output.
Reviewed-by: kh1
parent
9faa4b5a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.cpp
View file @
8dd627a2
...
...
@@ -406,7 +406,7 @@ MaemoDebugRunControl::~MaemoDebugRunControl()
void
MaemoDebugRunControl
::
startInternal
()
{
m_
inferiorPid
=
-
1
;
m_
debuggingStarted
=
false
;
startDeployment
(
true
);
}
...
...
@@ -419,27 +419,11 @@ QString MaemoDebugRunControl::remoteCall() const
void
MaemoDebugRunControl
::
handleRemoteOutput
(
const
QString
&
output
)
{
qDebug
(
"gdbserver's stderr output: %s"
,
output
.
toLatin1
().
data
());
if
(
m_inferiorPid
!=
-
1
)
return
;
const
QString
searchString
(
"pid = "
);
const
int
searchStringLength
=
searchString
.
length
();
int
pidStartPos
=
output
.
indexOf
(
searchString
);
const
int
pidEndPos
=
output
.
indexOf
(
"
\n
"
,
pidStartPos
+
searchStringLength
);
if
(
pidStartPos
==
-
1
||
pidEndPos
==
-
1
)
return
;
// gdbserver has not started yet.
pidStartPos
+=
searchStringLength
;
QString
pidString
=
output
.
mid
(
pidStartPos
,
pidEndPos
-
pidStartPos
);
qDebug
(
"pidString = %s"
,
pidString
.
toLatin1
().
data
());
bool
ok
;
const
int
pid
=
pidString
.
toInt
(
&
ok
);
if
(
!
ok
)
{
handleError
(
tr
(
"Debugging failed: Could not parse gdbserver output."
));
m_debuggerManager
->
exitDebugger
();
}
else
{
m_inferiorPid
=
pid
;
if
(
!
m_debuggingStarted
)
{
m_debuggingStarted
=
true
;
startDebugging
();
}
emit
addToOutputWindowInline
(
this
,
output
);
}
void
MaemoDebugRunControl
::
startDebugging
()
...
...
@@ -465,7 +449,7 @@ void MaemoDebugRunControl::debuggingFinished()
void
MaemoDebugRunControl
::
debuggerOutput
(
const
QString
&
output
)
{
emit
addToOutputWindowInline
(
this
,
output
);
emit
addToOutputWindowInline
(
this
,
QLatin1String
(
"[gdb says:] "
)
+
output
);
}
QString
MaemoDebugRunControl
::
gdbServerPort
()
const
...
...
src/plugins/qt4projectmanager/qt-maemo/maemoruncontrol.h
View file @
8dd627a2
...
...
@@ -165,7 +165,8 @@ private:
Debugger
::
DebuggerManager
*
m_debuggerManager
;
QSharedPointer
<
Debugger
::
DebuggerStartParameters
>
m_startParams
;
int
m_inferiorPid
;
bool
m_debuggingStarted
;
};
}
// namespace Internal
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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