From 8cf2aefc37176d14fdc4053b1447b8023753a04e Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Sun, 24 May 2020 10:22:00 +0100 Subject: [PATCH] Bug 562164: Use absolute memory address on export Change-Id: I8b97ad10cd55a751ac8a5b7e4a01009b623f565d --- .../cdt/debug/core/memory/transport/IReadMemory.java | 7 ++++--- .../internal/core/memory/transport/ReadMemoryBlock.java | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/core/memory/transport/IReadMemory.java b/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/core/memory/transport/IReadMemory.java index c08e2b6c38d..a83e2466951 100644 --- a/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/core/memory/transport/IReadMemory.java +++ b/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/core/memory/transport/IReadMemory.java @@ -10,6 +10,7 @@ * * Contributors: * Alexander Fedorov (ArSysOp) - initial API and implementation + * John Dallaway - use absolute memory address (bug 562164) *******************************************************************************/ package org.eclipse.cdt.debug.core.memory.transport; @@ -26,17 +27,17 @@ import org.eclipse.debug.core.model.MemoryByte; public interface IReadMemory { /** - * Reads an array of bytes from a memory starting from the given offset. If requested to retrieve data beyond the memory + * Reads an array of bytes from a memory starting from the given address. If requested to retrieve data beyond the memory * boundaries, implementations should return memory bytes with the READABLE bit turned off for each byte outside the * of the accessible range. An exception should not be thrown in this case. * - * @param offset zero based offset at which to start retrieving bytes in terms of addressable units + * @param address address at which to begin retrieving bytes in terms of addressable units * @param units the number of addressable units to retrieve * @return the obtained data, {@link MemoryByte#isReadable()} needs to be checked * @throws DebugException if unable to retrieve the specified bytes due to a failure communicating with the target * * @see {@link MemoryByte} */ - MemoryByte[] from(BigInteger offset, long units) throws DebugException; + MemoryByte[] from(BigInteger address, long units) throws DebugException; } diff --git a/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/internal/core/memory/transport/ReadMemoryBlock.java b/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/internal/core/memory/transport/ReadMemoryBlock.java index 12a96854085..2ec527cb8c8 100644 --- a/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/internal/core/memory/transport/ReadMemoryBlock.java +++ b/memory/org.eclipse.cdt.debug.core.memory/src/org/eclipse/cdt/debug/internal/core/memory/transport/ReadMemoryBlock.java @@ -10,6 +10,7 @@ * * Contributors: * Alexander Fedorov (ArSysOp) - initial API and implementation + * John Dallaway - use absolute memory address (bug 562164) *******************************************************************************/ package org.eclipse.cdt.debug.internal.core.memory.transport; @@ -33,8 +34,8 @@ public final class ReadMemoryBlock implements IReadMemory { } @Override - public MemoryByte[] from(BigInteger offset, long units) throws DebugException { - return memory.getBytesFromOffset(offset, units); + public MemoryByte[] from(BigInteger address, long units) throws DebugException { + return memory.getBytesFromAddress(address, units); } }