1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Added new method createMemoryBlock() takes string

as the first argument.
This commit is contained in:
Alain Magloire 2002-10-17 14:29:51 +00:00
parent aa7b0c68a0
commit 9bad4794b2

View file

@ -33,11 +33,19 @@ public class MemoryManager extends SessionObject implements ICDIMemoryManager {
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#createMemoryBlock(long, int)
*/
public ICDIMemoryBlock createMemoryBlock(long address, int length)
throws CDIException {
String addr = "0x" + Long.toHexString(address);
return createMemoryBlock(addr, length);
}
/**
* @see org.eclipse.cdt.debug.core.cdi.ICDIMemoryManager#createMemoryBlock(string, int)
*/
public ICDIMemoryBlock createMemoryBlock(String address, int length)
throws CDIException {
MISession mi = getCSession().getMISession();
CommandFactory factory = mi.getCommandFactory();
String addr = "0x" + Long.toHexString(address);
MIDataReadMemory mem = factory.createMIDataReadMemory(0, addr, MIFormat.HEXADECIMAL, 1, 1, length, null);
MIDataReadMemory mem = factory.createMIDataReadMemory(0, address, MIFormat.HEXADECIMAL, 1, 1, length, null);
try {
mi.postCommand(mem);
MIDataReadMemoryInfo info = mem.getMIDataReadMemoryInfo();