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
214d998b
Commit
214d998b
authored
Sep 28, 2009
by
hjk
Browse files
debugger: let debugger console directly communicate with TRK
parent
b5706d77
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
214d998b
...
...
@@ -133,8 +133,7 @@ TrkGdbAdapter::TrkGdbAdapter(GdbEngine *engine, const TrkOptionsPtr &options) :
connect
(
&
m_trkDevice
,
SIGNAL
(
error
(
QString
)),
this
,
SLOT
(
handleTrkError
(
QString
)));
if
(
m_verbose
>
1
)
m_trkDevice
.
setVerbose
(
true
);
m_trkDevice
.
setVerbose
(
m_verbose
);
m_trkDevice
.
setSerialFrame
(
m_options
->
mode
!=
TrkOptions
::
BlueTooth
);
connect
(
&
m_trkDevice
,
SIGNAL
(
logMessage
(
QString
)),
...
...
@@ -1202,7 +1201,7 @@ void TrkGdbAdapter::handleReadMemoryUnbuffered(const TrkResult &result)
void
TrkGdbAdapter
::
handleStepInto
(
const
TrkResult
&
result
)
{
if
(
result
.
errorCode
())
{
logMessage
(
"ERROR: "
+
result
.
errorString
()
+
"in handleStepInto"
);
logMessage
(
"ERROR: "
+
result
.
errorString
()
+
"
in handleStepInto"
);
// Try fallback with Step Over
QByteArray
ba
=
trkStepRangeMessage
(
0x11
);
// options "step over"
sendTrkMessage
(
0x19
,
TrkCB
(
handleStepInto2
),
ba
,
"Step range"
);
...
...
@@ -1215,7 +1214,7 @@ void TrkGdbAdapter::handleStepInto(const TrkResult &result)
void
TrkGdbAdapter
::
handleStepInto2
(
const
TrkResult
&
result
)
{
if
(
result
.
errorCode
())
{
logMessage
(
"ERROR: "
+
result
.
errorString
()
+
"in handleStepInto2"
);
logMessage
(
"ERROR: "
+
result
.
errorString
()
+
"
in handleStepInto2"
);
// Try fallback with Continue
sendTrkMessage
(
0x18
,
TrkCallback
(),
trkContinueMessage
(),
"CONTINUE"
);
//sendGdbServerMessage("S05", "Stepping finished");
...
...
@@ -1625,9 +1624,22 @@ QByteArray TrkGdbAdapter::readAllStandardOutput()
void
TrkGdbAdapter
::
write
(
const
QByteArray
&
data
)
{
// Write magic packets directly to TRK.
if
(
data
.
startsWith
(
"@#"
))
{
QByteArray
ba
=
QByteArray
::
fromHex
(
data
.
mid
(
2
));
qDebug
()
<<
"Writing: "
<<
quoteUnprintableLatin1
(
ba
);
if
(
ba
.
size
()
>=
1
)
sendTrkMessage
(
ba
.
at
(
0
),
TrkCB
(
handleDirectTrk
),
ba
.
mid
(
1
));
return
;
}
m_gdbProc
.
write
(
data
,
data
.
size
());
}
void
TrkGdbAdapter
::
handleDirectTrk
(
const
TrkResult
&
result
)
{
logMessage
(
"HANDLE DIRECT TRK: "
+
stringFromArray
(
result
.
data
));
}
void
TrkGdbAdapter
::
setWorkingDirectory
(
const
QString
&
dir
)
{
m_gdbProc
.
setWorkingDirectory
(
dir
);
...
...
src/plugins/debugger/gdb/trkgdbadapter.h
View file @
214d998b
...
...
@@ -150,6 +150,7 @@ public:
void
handleDisconnect
(
const
TrkResult
&
result
);
void
handleDeleteProcess
(
const
TrkResult
&
result
);
void
handleDeleteProcess2
(
const
TrkResult
&
result
);
void
handleDirectTrk
(
const
TrkResult
&
response
);
void
handleAndReportCreateProcess
(
const
TrkResult
&
result
);
void
handleAndReportReadRegistersAfterStop
(
const
TrkResult
&
result
);
...
...
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