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:
parent
aa7b0c68a0
commit
9bad4794b2
1 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue