Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
533a85a6
Commit
533a85a6
authored
15 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
debugger: in trk communication one needs to acknowledge the loading of 'really
shared' libraries but not of 'static' dlls.
parent
805b0a9c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/debugger/gdb/trkgdbadapter.cpp
+26
-9
26 additions, 9 deletions
src/plugins/debugger/gdb/trkgdbadapter.cpp
with
26 additions
and
9 deletions
src/plugins/debugger/gdb/trkgdbadapter.cpp
+
26
−
9
View file @
533a85a6
...
...
@@ -203,6 +203,7 @@ void Snapshot::insertMemory(const MemoryRange &range, const QByteArray &ba)
// Not combinable, add chunk.
memory
.
insert
(
range
,
ba
);
}
///////////////////////////////////////////////////////////////////////////
//
// TrkGdbAdapter
...
...
@@ -1046,6 +1047,9 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
void
TrkGdbAdapter
::
sendTrkMessage
(
byte
code
,
TrkCallback
callback
,
const
QByteArray
&
data
,
const
QVariant
&
cookie
)
{
if
(
m_verbose
>=
2
)
logMessage
(
"trk: -> "
+
QByteArray
::
number
(
code
,
16
)
+
" "
+
stringFromArray
(
data
));
m_trkDevice
->
sendTrkMessage
(
code
,
callback
,
data
,
cookie
);
}
...
...
@@ -1062,6 +1066,8 @@ void TrkGdbAdapter::handleTrkError(const QString &msg)
void
TrkGdbAdapter
::
handleTrkResult
(
const
TrkResult
&
result
)
{
if
(
m_verbose
>=
2
)
logMessage
(
"trk: <- "
+
result
.
toString
());
if
(
result
.
isDebugOutput
)
{
// It looks like those messages _must not_ be acknowledged.
// If we do so, TRK will complain about wrong sequencing.
...
...
@@ -1119,11 +1125,13 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
// several instruction steps, better avoid the multiple
// roundtrips through TRK in favour of an additional
// roundtrip through gdb. But gdb will ask for all registers.
//sendGdbServerMessage("S05", "Target stopped");
// -- or --
QByteArray
ba
=
"T05"
;
appendRegister
(
&
ba
,
RegisterPSGdb
,
addr
);
sendGdbServerMessage
(
ba
,
"Registers"
);
#if 1
sendGdbServerMessage
(
"S05"
,
"Target stopped"
);
#else
QByteArray
ba
=
"T05"
;
appendRegister
(
&
ba
,
RegisterPSGdb
,
addr
);
sendGdbServerMessage
(
ba
,
"Registers"
);
#endif
#endif
break
;
}
...
...
@@ -1187,7 +1195,15 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
+ ",TextSeg=" + hexNumber(lib.codeseg)
+ ",DataSeg=" + hexNumber(lib.dataseg) + ';');
*/
sendTrkMessage
(
0x18
,
TrkCallback
(),
trkContinueMessage
(),
"CONTINUE"
);
// After 'continue' the very first time after starting debugging
// a process some library load events are generated, these are
// actually static dependencies for the process. For these libraries,
// the thread id is -1 which means the debugger doesn't have
// to continue. The debugger can safely assume that the
// thread resumption will be handled by the agent itself.
if
(
tid
!=
unsigned
(
-
1
))
sendTrkMessage
(
0x18
,
TrkCallback
(),
trkContinueMessage
(),
"CONTINUE"
);
break
;
}
case
0xa1
:
{
// NotifyDeleted
...
...
@@ -1465,7 +1481,7 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
return
;
}
}
// Happens when chunks are not com
n
bined
// Happens when chunks are not combined
QTC_ASSERT
(
false
,
/**/
);
debugMessage
(
"CHUNKS NOT COMBINED"
);
#ifdef MEMORY_DEBUG
...
...
@@ -1794,7 +1810,8 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
logMessage
(
startMsg
);
if
(
m_symbolFile
.
isEmpty
())
{
const
QByteArray
symbolFile
=
m_symbolFile
.
toLocal8Bit
();
if
(
symbolFile
.
isEmpty
())
{
logMessage
(
_
(
"WARNING: No symbol file available."
));
}
else
{
// Does not seem to be necessary anymore.
...
...
@@ -1802,7 +1819,7 @@ void TrkGdbAdapter::handleCreateProcess(const TrkResult &result)
// have to wait for the TRK startup to learn the load address.
//m_engine->postCommand("add-symbol-file \"" + symbolFile + "\" "
// + QByteArray::number(m_session.codeseg));
m_engine
->
postCommand
(
"symbol-file
\"
"
+
m_
symbolFile
.
toLatin1
()
+
"
\"
"
);
m_engine
->
postCommand
(
"symbol-file
\"
"
+
symbolFile
+
"
\"
"
);
}
m_engine
->
postCommand
(
"set breakpoint always-inserted on"
);
m_engine
->
postCommand
(
"set trust-readonly-sections"
);
// No difference?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment