forked from qt-creator/qt-creator
Debugger: Improve register check for memory layout.
This commit is contained in:
@@ -295,11 +295,18 @@ static inline MemoryMarkupList
|
|||||||
return result; // Fixme: Exact size not known, no point in filling if no children.
|
return result; // Fixme: Exact size not known, no point in filling if no children.
|
||||||
// Punch in registers as 1-byte markers on top.
|
// Punch in registers as 1-byte markers on top.
|
||||||
const RegisterMapConstIt regcEnd = registerMap.constEnd();
|
const RegisterMapConstIt regcEnd = registerMap.constEnd();
|
||||||
for (RegisterMapConstIt it = registerMap.constBegin(); it != regcEnd; ++it)
|
for (RegisterMapConstIt it = registerMap.constBegin(); it != regcEnd; ++it) {
|
||||||
if (it.key() - address < size)
|
if (it.key() >= address) {
|
||||||
ranges[it.key() - address] =
|
const quint64 offset = it.key() - address;
|
||||||
|
if (offset < size) {
|
||||||
|
ranges[offset] =
|
||||||
ColorNumberToolTipPair(registerColorNumber,
|
ColorNumberToolTipPair(registerColorNumber,
|
||||||
WatchWindow::tr("Register <i>%1</i>").arg(it.value()));
|
WatchWindow::tr("Register <i>%1</i>").arg(it.value()));
|
||||||
|
} else {
|
||||||
|
break; // Sorted.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // for registers.
|
||||||
if (debug) {
|
if (debug) {
|
||||||
QDebug dbg = qDebug().nospace();
|
QDebug dbg = qDebug().nospace();
|
||||||
dbg << rootToolTip << ' ' << address << ' ' << size << '\n';
|
dbg << rootToolTip << ' ' << address << ' ' << size << '\n';
|
||||||
|
|||||||
Reference in New Issue
Block a user