mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-12 06:28:23 +08:00
GP-1231: Added 'Map by Regions' action to Debugger.
This commit is contained in:
@@ -22,7 +22,6 @@ import ghidra.program.model.address.AddressSpace;
|
||||
import ghidra.program.util.ProgramLocation;
|
||||
import ghidra.trace.model.DefaultTraceLocation;
|
||||
import ghidra.trace.model.Trace;
|
||||
import ghidra.util.database.UndoableTransaction;
|
||||
|
||||
public class AddMapping extends GhidraScript {
|
||||
@Override
|
||||
@@ -35,13 +34,10 @@ public class AddMapping extends GhidraScript {
|
||||
AddressSpace dynRam = currentTrace.getBaseAddressFactory().getDefaultAddressSpace();
|
||||
AddressSpace statRam = currentProgram.getAddressFactory().getDefaultAddressSpace();
|
||||
|
||||
try (UndoableTransaction tid =
|
||||
UndoableTransaction.start(currentTrace, "Add Mapping", true)) {
|
||||
mappings.addMapping(
|
||||
new DefaultTraceLocation(currentTrace, null, Range.atLeast(0L),
|
||||
dynRam.getAddress(0x00400000)),
|
||||
new ProgramLocation(currentProgram, statRam.getAddress(0x00400000)),
|
||||
0x10000, false);
|
||||
}
|
||||
mappings.addMapping(
|
||||
new DefaultTraceLocation(currentTrace, null, Range.atLeast(0L),
|
||||
dynRam.getAddress(0x00400000)),
|
||||
new ProgramLocation(currentProgram, statRam.getAddress(0x00400000)),
|
||||
0x10000, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user