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
2834fb86
Commit
2834fb86
authored
Nov 05, 2010
by
Pawel Polanski
Browse files
Memory dump is not refreshed while debugging for SymbianOS
parent
9118aa8d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/debugger/gdb/symbian.cpp
View file @
2834fb86
...
...
@@ -203,14 +203,12 @@ Snapshot::Snapshot()
void
Snapshot
::
reset
()
{
MEMORY_DEBUG
(
"RESET SNAPSHOT MEMORY INITIALLY: "
<<
memory
.
size
()
<<
" BLOCK LEFT"
);
for
(
Memory
::
Iterator
it
=
memory
.
begin
();
it
!=
memory
.
end
();
)
{
if
(
isReadOnly
(
it
.
key
()))
{
MEMORY_DEBUG
(
"KEEPING READ-ONLY RANGE"
<<
it
.
key
());
++
it
;
}
else
{
it
=
memory
.
erase
(
it
);
}
MEMORY_DEBUG
(
"EXAMINING "
<<
it
.
key
());
it
=
memory
.
erase
(
it
);
}
MEMORY_DEBUG
(
"RESET SNAPSHOT MEMORY FINALLY: "
<<
memory
.
size
()
<<
" BLOCK LEFT"
);
const
int
threadCount
=
threadInfo
.
size
();
for
(
int
i
=
0
;
i
<
threadCount
;
i
++
)
{
...
...
@@ -466,7 +464,7 @@ QByteArray Snapshot::memoryReadLogMessage(uint addr, uint threadId, bool verbose
logMsg
+=
" length "
;
logMsg
+=
QByteArray
::
number
(
ba
.
size
());
logMsg
+=
" :"
;
logMsg
+=
trk
::
stringFromArray
(
ba
,
16
).
toAscii
();
logMsg
+=
trk
::
stringFromArray
(
ba
,
ba
.
size
()
).
toAscii
();
}
return
logMsg
;
}
...
...
src/plugins/debugger/gdb/trkgdbadapter.cpp
View file @
2834fb86
...
...
@@ -263,6 +263,7 @@ void TrkGdbAdapter::logMessage(const QString &msg, int logChannel)
{
if
(
m_verbose
||
logChannel
!=
LogDebug
)
showMessage
(
"TRK LOG: "
+
msg
,
logChannel
);
MEMORY_DEBUG
(
"GDB: "
<<
msg
);
}
//
...
...
@@ -946,7 +947,9 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
case
TrkNotifyStopped
:
{
// 0x90 Notified Stopped
// 90 01 78 6a 40 40 00 00 07 23 00 00 07 24 00 00
showMessage
(
_
(
"RESET SNAPSHOT (NOTIFY STOPPED)"
));
MEMORY_DEBUG
(
"WE STOPPED"
);
m_snapshot
.
reset
();
MEMORY_DEBUG
(
" AFTER CLEANING: "
<<
m_snapshot
.
memory
.
size
()
<<
" BLOCKS LEFT"
);
QString
reason
;
uint
addr
;
uint
pid
;
...
...
@@ -1212,6 +1215,7 @@ void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
if
(
extractShort
(
result
.
data
.
data
()
+
1
)
+
3
!=
result
.
data
.
size
())
logMessage
(
"
\n
BAD MEMORY RESULT: "
+
result
.
data
.
toHex
()
+
"
\n
"
,
LogError
);
const
MemoryRange
range
=
result
.
cookie
.
value
<
MemoryRange
>
();
MEMORY_DEBUG
(
"HANDLE READ MEMORY ***BUFFERED*** FOR "
<<
range
);
if
(
const
int
errorCode
=
result
.
errorCode
())
{
logMessage
(
_
(
"TEMPORARY: "
)
+
msgMemoryReadError
(
errorCode
,
range
.
from
));
logMessage
(
_
(
"RETRYING UNBUFFERED"
));
...
...
@@ -1221,6 +1225,7 @@ void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
return
;
}
const
QByteArray
ba
=
result
.
data
.
mid
(
3
);
MEMORY_DEBUG
(
"INSERT KNOWN MEMORY RANGE: "
<<
range
<<
m_snapshot
.
memory
.
size
()
<<
" BLOCKS"
);
m_snapshot
.
insertMemory
(
range
,
ba
);
tryAnswerGdbMemoryRequest
(
true
);
}
...
...
@@ -1230,6 +1235,7 @@ void TrkGdbAdapter::handleReadMemoryUnbuffered(const TrkResult &result)
if
(
extractShort
(
result
.
data
.
data
()
+
1
)
+
3
!=
result
.
data
.
size
())
logMessage
(
"
\n
BAD MEMORY RESULT: "
+
result
.
data
.
toHex
()
+
"
\n
"
,
LogError
);
const
MemoryRange
range
=
result
.
cookie
.
value
<
MemoryRange
>
();
MEMORY_DEBUG
(
"HANDLE READ MEMORY UNBUFFERED FOR "
<<
range
);
if
(
const
int
errorCode
=
result
.
errorCode
())
{
logMessage
(
_
(
"TEMPORARY: "
)
+
msgMemoryReadError
(
errorCode
,
range
.
from
));
logMessage
(
_
(
"RETRYING UNBUFFERED"
));
...
...
@@ -1247,6 +1253,7 @@ void TrkGdbAdapter::handleReadMemoryUnbuffered(const TrkResult &result)
}
const
QByteArray
ba
=
result
.
data
.
mid
(
3
);
m_snapshot
.
insertMemory
(
range
,
ba
);
MEMORY_DEBUG
(
"INSERT KNOWN MEMORY RANGE: "
<<
range
<<
m_snapshot
.
memory
.
size
()
<<
" BLOCKS"
);
tryAnswerGdbMemoryRequest
(
false
);
}
...
...
@@ -1310,10 +1317,10 @@ void TrkGdbAdapter::tryAnswerGdbMemoryRequest(bool buffered)
int
len
=
needed
.
to
-
needed
.
from
;
logMessage
(
_
(
"Requesting unbuffered memory %1 bytes from 0x%2"
)
.
arg
(
len
).
arg
(
needed
.
from
,
0
,
16
));
MEMORY_DEBUG
(
" FETCH UNBUFFERED MEMORY : "
<<
needed
);
sendTrkMessage
(
0x10
,
TrkCB
(
handleReadMemoryUnbuffered
),
trkReadMemoryMessage
(
needed
),
QVariant
::
fromValue
(
needed
));
MEMORY_DEBUG
(
" FETCH UNBUFFERED MEMORY : "
<<
needed
);
}
}
...
...
src/shared/symbianutils/trkdevice.cpp
View file @
2834fb86
...
...
@@ -1091,7 +1091,7 @@ void TrkDevice::slotMessageReceived(const trk::TrkResult &result, const QByteArr
if
(
isOpen
())
{
// Might receive bytes after closing due to queued connections.
d
->
writerThread
->
slotHandleResult
(
result
);
if
(
d
->
verbose
>
1
)
qDebug
()
<<
"Received: "
<<
result
.
toString
();
qDebug
()
<<
"
TRK DEVICE
Received: "
<<
result
.
toString
();
emit
messageReceived
(
result
);
if
(
!
rawData
.
isEmpty
())
emit
rawDataReceived
(
rawData
);
...
...
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