Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
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
Tobias Hunger
qt-creator
Commits
e4f253ea
Commit
e4f253ea
authored
15 years ago
by
Friedemann Kleint
Browse files
Options
Downloads
Patches
Plain Diff
Trk/Debugger: Invoke memory read callback directly if no requests
are sent.
parent
6baeb06a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/debugger/gdb/trkgdbadapter.cpp
+16
-4
16 additions, 4 deletions
src/plugins/debugger/gdb/trkgdbadapter.cpp
src/plugins/debugger/gdb/trkgdbadapter.h
+1
-0
1 addition, 0 deletions
src/plugins/debugger/gdb/trkgdbadapter.h
with
17 additions
and
4 deletions
src/plugins/debugger/gdb/trkgdbadapter.cpp
+
16
−
4
View file @
e4f253ea
...
...
@@ -1155,7 +1155,11 @@ void TrkGdbAdapter::reportReadMemoryBuffered(const TrkResult &result)
const
qulonglong
cookie
=
result
.
cookie
.
toULongLong
();
const
uint
addr
=
cookie
>>
32
;
const
uint
len
=
uint
(
cookie
);
reportReadMemoryBuffered
(
addr
,
len
);
}
void
TrkGdbAdapter
::
reportReadMemoryBuffered
(
uint
addr
,
uint
len
)
{
// Gdb accepts less memory according to documentation.
// Send E on complete failure.
QByteArray
ba
;
...
...
@@ -1320,6 +1324,7 @@ void TrkGdbAdapter::readMemory(uint addr, uint len)
.
arg
(
len
).
arg
(
addr
,
0
,
16
).
arg
(
MemoryChunkSize
));
if
(
m_bufferedMemoryRead
)
{
uint
requests
=
0
;
uint
blockaddr
=
(
addr
/
MemoryChunkSize
)
*
MemoryChunkSize
;
for
(;
blockaddr
<
addr
+
len
;
blockaddr
+=
MemoryChunkSize
)
{
if
(
!
m_snapshot
.
memory
.
contains
(
blockaddr
))
{
...
...
@@ -1330,12 +1335,19 @@ void TrkGdbAdapter::readMemory(uint addr, uint len)
sendTrkMessage
(
0x10
,
TrkCB
(
handleReadMemoryBuffered
),
trkReadMemoryMessage
(
blockaddr
,
MemoryChunkSize
),
QVariant
(
blockaddr
));
requests
++
;
}
}
const
qulonglong
cookie
=
(
qulonglong
(
addr
)
<<
32
)
+
len
;
sendTrkMessage
(
TRK_WRITE_QUEUE_NOOP_CODE
,
TrkCB
(
reportReadMemoryBuffered
),
QByteArray
(),
cookie
);
}
else
{
// If requests have been sent: Sync
if
(
requests
)
{
const
qulonglong
cookie
=
(
qulonglong
(
addr
)
<<
32
)
+
len
;
sendTrkMessage
(
TRK_WRITE_QUEUE_NOOP_CODE
,
TrkCB
(
reportReadMemoryBuffered
),
QByteArray
(),
cookie
);
}
else
{
// Everything is already buffered: invoke callback directly
reportReadMemoryBuffered
(
addr
,
len
);
}
}
else
{
// Unbuffered, direct requests
if
(
m_verbose
)
logMessage
(
QString
::
fromLatin1
(
"Requesting unbuffered memory %1 "
"bytes from 0x%2"
).
arg
(
len
).
arg
(
addr
,
0
,
16
));
...
...
This diff is collapsed.
Click to expand it.
src/plugins/debugger/gdb/trkgdbadapter.h
+
1
−
0
View file @
e4f253ea
...
...
@@ -170,6 +170,7 @@ public:
void
handleStepOver2
(
const
TrkResult
&
result
);
void
handleReadRegisters
(
const
TrkResult
&
result
);
void
reportReadMemoryBuffered
(
const
TrkResult
&
result
);
void
reportReadMemoryBuffered
(
uint
addr
,
uint
len
);
void
handleWriteRegister
(
const
TrkResult
&
result
);
void
reportToGdb
(
const
TrkResult
&
result
);
...
...
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