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
22904c5c
Commit
22904c5c
authored
Sep 15, 2009
by
hjk
Browse files
debugger: improve setting of initial breakpoints in the trk case
parent
1703c8c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/gdbengine.cpp
View file @
22904c5c
...
...
@@ -1715,10 +1715,13 @@ void GdbEngine::startDebugger2()
}
else
if
(
m_startParameters
.
useTerminal
)
{
qq
->
breakHandler
()
->
setAllPending
();
}
else
if
(
startMode
()
==
StartInternal
||
startMode
()
==
StartExternal
)
{
qq
->
breakHandler
()
->
setAllPending
();
m_gdbAdapter
->
attach
();
if
(
m_gdbAdapter
->
isAdapter
())
{
m_autoContinue
=
true
;
qq
->
notifyInferiorStopped
();
attemptBreakpointSynchronization
();
qq
->
notifyInferiorRunningRequested
();
postCommand
(
_
(
"-exec-continue"
),
CB
(
handleExecContinue
));
}
else
{
#ifdef Q_OS_MAC
postCommand
(
_
(
"sharedlibrary apply-load-rules all"
));
...
...
@@ -1737,7 +1740,6 @@ void GdbEngine::startDebugger2()
postCommand
(
_
(
"info target"
),
CB
(
handleStart
));
#endif
}
qq
->
breakHandler
()
->
setAllPending
();
}
emit
startSuccessful
();
...
...
@@ -1806,7 +1808,8 @@ void GdbEngine::handleSetTargetAsync(const GdbResultRecord &record, const QVaria
{
if
(
record
.
resultClass
==
GdbResultDone
)
{
qq
->
notifyInferiorRunningRequested
();
postCommand
(
_
(
"target remote %1"
).
arg
(
m_manager
->
startParameters
()
->
remoteChannel
),
postCommand
(
_
(
"target remote %1"
)
.
arg
(
m_manager
->
startParameters
()
->
remoteChannel
),
CB
(
handleTargetRemote
));
}
else
if
(
record
.
resultClass
==
GdbResultError
)
{
// a typical response on "old" gdb is:
...
...
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
22904c5c
...
...
@@ -643,7 +643,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
// actions supported by the vCont packet
sendGdbServerAck
();
//sendGdbServerMessage("OK"); // we don't support vCont.
sendGdbServerMessage
(
"vCont;c;C;s;S
;n
"
);
sendGdbServerMessage
(
"vCont;c;C;s;S"
);
}
else
if
(
cmd
==
"vCont;c"
)
{
...
...
@@ -753,7 +753,7 @@ void TrkGdbAdapter::sendTrkMessage(byte code, TrkCallback callback,
void
TrkGdbAdapter
::
sendTrkAck
(
byte
token
)
{
logMessage
(
QString
(
"SENDING ACKNOWLEDGEMENT FOR TOKEN %1"
).
arg
(
int
(
token
)));
//
logMessage(QString("SENDING ACKNOWLEDGEMENT FOR TOKEN %1").arg(int(token)));
m_trkDevice
.
sendTrkAck
(
token
);
}
...
...
@@ -771,7 +771,7 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
sendGdbServerMessage
(
"O"
+
result
.
data
.
toHex
());
return
;
}
logMessage
(
"READ TRK "
+
result
.
toString
());
//
logMessage("READ TRK " + result.toString());
QByteArray
prefix
=
"READ BUF: "
;
QByteArray
str
=
result
.
toString
().
toUtf8
();
switch
(
result
.
code
)
{
...
...
@@ -984,7 +984,7 @@ void TrkGdbAdapter::handleAndReportReadRegistersAfterStop(const TrkResult &resul
//for (int i = 16; i < 25; ++i)
// appendRegister(&ba, i, 0x0);
appendRegister
(
&
ba
,
RegisterPSGdb
,
m_snapshot
.
registers
[
RegisterPSTrk
]);
qDebug
()
<<
"TrkGdbAdapter::handleAndReportReadRegistersAfterStop"
<<
ba
;
//
qDebug() << "TrkGdbAdapter::handleAndReportReadRegistersAfterStop" << ba;
sendGdbServerMessage
(
ba
,
"Registers"
);
}
...
...
@@ -1235,6 +1235,7 @@ void TrkGdbAdapter::readMemory(uint addr, uint len)
void
TrkGdbAdapter
::
interruptInferior
()
{
qDebug
()
<<
"TRYING TO INTERRUPT INFERIOR"
;
QByteArray
ba
;
// stop the thread (2) or the process (1) or the whole system (0)
// We choose 2, as 1 does not seem to work.
...
...
@@ -1424,8 +1425,9 @@ void TrkGdbAdapter::attach()
m_engine
->
postCommand
(
_
(
"add-symbol-file
\"
%1
\"
%2"
).
arg
(
fileName
)
.
arg
(
m_session
.
codeseg
));
m_engine
->
postCommand
(
_
(
"symbol-file
\"
%1
\"
"
).
arg
(
fileName
));
//m_engine->postCommand(_("target remote ") + gdbServerName(),
// &GdbEngine::handleTargetRemote, "handleTargetRemote");
m_engine
->
postCommand
(
_
(
"target remote "
)
+
gdbServerName
());
m_engine
->
attemptBreakpointSynchronization
();
#endif
}
...
...
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