mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 15:45:25 +02:00
Memory block offset fix when comparing 2 blocks to determine the changed bytes between debug steps.
This commit is contained in:
parent
de03bba29b
commit
7233f702b8
1 changed files with 3 additions and 3 deletions
|
@ -274,11 +274,10 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
|
|||
|
||||
// Flag the changed bytes
|
||||
if (fBlock != null && newLength > 0) {
|
||||
int offset = fBaseAddress.compareTo(address);
|
||||
switch (offset) {
|
||||
switch (fBaseAddress.compareTo(address)) {
|
||||
case -1:
|
||||
{
|
||||
offset = -offset;
|
||||
int offset = address.subtract(fBaseAddress).intValue();
|
||||
int length = Math.min(fLength - offset, newLength);
|
||||
for (int i = 0; i < length; i += 4) {
|
||||
boolean changed = false;
|
||||
|
@ -299,6 +298,7 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
|
|||
case 0:
|
||||
case 1:
|
||||
{
|
||||
int offset = fBaseAddress.subtract(address).intValue();
|
||||
int length = Math.min(newLength - offset, fLength);
|
||||
for (int i = 0; i < length; i += 4) {
|
||||
boolean changed = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue