mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
GP-2437: Change DBAddressFieldCodec to use FixedField10
This commit is contained in:
parent
b289708a00
commit
c0c25e3805
114 changed files with 2354 additions and 652 deletions
|
@ -34,7 +34,7 @@ import ghidra.util.database.UndoableTransaction;
|
|||
import ghidra.util.exception.DuplicateNameException;
|
||||
|
||||
/**
|
||||
* This script populates a trace database with memory derived from "!address". This is particularly
|
||||
* This script populates a trace database with memory derived from "!address". This is particularly
|
||||
* useful for dump files and other cases where QueryVirtual fails.
|
||||
*
|
||||
* <p>
|
||||
|
@ -64,7 +64,6 @@ public class BangAddressToMemory extends GhidraScript {
|
|||
|
||||
private AddressSpace defaultSpace;
|
||||
|
||||
|
||||
private DebuggerModelService modelService;
|
||||
private DebuggerTraceManagerService managerService;
|
||||
|
||||
|
@ -96,7 +95,7 @@ public class BangAddressToMemory extends GhidraScript {
|
|||
if (modelService == null) {
|
||||
throw new RuntimeException("Unable to find DebuggerMemviewPlugin");
|
||||
}
|
||||
|
||||
|
||||
DebuggerObjectModel model = modelService.getCurrentModel();
|
||||
if (!(model instanceof AbstractDbgModel)) {
|
||||
throw new RuntimeException("Current model must be an AbstractDbgModel");
|
||||
|
@ -111,7 +110,7 @@ public class BangAddressToMemory extends GhidraScript {
|
|||
throw new RuntimeException("Script requires an active trace");
|
||||
}
|
||||
memory = trace.getMemoryManager();
|
||||
|
||||
|
||||
lang = currentProgram.getLanguage();
|
||||
defaultSpace = lang.getAddressFactory().getDefaultAddressSpace();
|
||||
|
||||
|
@ -121,7 +120,7 @@ public class BangAddressToMemory extends GhidraScript {
|
|||
}
|
||||
|
||||
private void parse(String result) {
|
||||
try (UndoableTransaction tid = UndoableTransaction.start(trace, "Populate memory", true);
|
||||
try (UndoableTransaction tid = UndoableTransaction.start(trace, "Populate memory");
|
||||
LockHold hold = trace.lockWrite();) {
|
||||
//Pattern pattern = Pattern.compile("\\s+(*)\\s+(*)\\s+");
|
||||
//Matcher matcher = pattern.matcher(fullclassname);
|
||||
|
@ -149,7 +148,7 @@ public class BangAddressToMemory extends GhidraScript {
|
|||
try {
|
||||
TraceMemoryRegion region =
|
||||
memory.addRegion(startStr, Range.atLeast(0L), rng, TraceMemoryFlag.READ,
|
||||
TraceMemoryFlag.WRITE, TraceMemoryFlag.EXECUTE);
|
||||
TraceMemoryFlag.WRITE, TraceMemoryFlag.EXECUTE);
|
||||
region.setName(name);
|
||||
}
|
||||
catch (TraceOverlappedRegionException | DuplicateNameException e) {
|
||||
|
|
|
@ -191,7 +191,7 @@ public class PopulateTraceLocal extends GhidraScript {
|
|||
control.waitForEvent();
|
||||
|
||||
try (UndoableTransaction tid =
|
||||
UndoableTransaction.start(trace, "Populate Events", true)) {
|
||||
UndoableTransaction.start(trace, "Populate Events")) {
|
||||
|
||||
List<ModelObject> children =
|
||||
util.getElements(List.of("Debugger", "State", "DebuggerVariables", "curprocess",
|
||||
|
@ -284,7 +284,7 @@ public class PopulateTraceLocal extends GhidraScript {
|
|||
}
|
||||
|
||||
try (UndoableTransaction tid =
|
||||
UndoableTransaction.start(trace, "Populate Registers", true)) {
|
||||
UndoableTransaction.start(trace, "Populate Registers")) {
|
||||
//for (Long tick : tickManager.getAllTicks()) {
|
||||
for (Long snap : eventSnaps) {
|
||||
control.execute("!tt " + Long.toHexString(snap) + ":0");
|
||||
|
|
|
@ -151,7 +151,7 @@ public class PopulateTraceRemote extends GhidraScript {
|
|||
manager = tool.getService(DebuggerTraceManagerService.class);
|
||||
targets = tool.getService(DebuggerModelService.class);
|
||||
|
||||
try (UndoableTransaction tid = UndoableTransaction.start(trace, "Populate Events", true)) {
|
||||
try (UndoableTransaction tid = UndoableTransaction.start(trace, "Populate Events")) {
|
||||
timeManager = trace.getTimeManager();
|
||||
timeManager.createSnapshot("init");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue