mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
Bug 562164: Use absolute memory address on export
Change-Id: I8b97ad10cd55a751ac8a5b7e4a01009b623f565d
This commit is contained in:
parent
081069afcd
commit
8cf2aefc37
2 changed files with 7 additions and 5 deletions
|
@ -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 <code>READABLE</code> 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;
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue