deepcut works with pyGhida

This commit is contained in:
Maloney, Vivian
2025-09-12 14:07:48 -04:00
parent 22c0a93da4
commit 2a77c349b8
17 changed files with 458 additions and 213 deletions

View File

@@ -84,6 +84,7 @@ import ghidra.program.model.listing.*;
import ghidra.program.model.symbol.*;
import ghidra.program.util.ChangeManager;
import ghidra.program.util.DefinedDataIterator;
import ghidra.program.util.DefinedStringIterator;
import ghidra.program.util.GhidraProgramUtilities;
import ghidra.program.util.ProgramChangeRecord;
import ghidra.program.util.ProgramLocation;
@@ -1069,7 +1070,8 @@ public class CodeCutGUIPlugin extends ProgramPlugin implements DomainObjectListe
Accumulator<ProgramLocation> accumulator = new ListAccumulator<>();
Swing.allowSwingToProcessEvents();
for (Data stringInstance : DefinedDataIterator.definedStrings(currentProgram)) {
// 09032025 Vivian, changed to accommodate updated ghidra api
for (Data stringInstance : DefinedStringIterator.forProgram(currentProgram)) {
Address strAddr = stringInstance.getAddress();
ReferenceIterator refIterator = refManager.getReferencesTo(strAddr);
while (refIterator.hasNext()) {

View File

@@ -65,7 +65,6 @@ public class GraphCutLayout extends AbstractVisualGraphLayout<GraphCutVertex, Gr
return newLayout;
}
@Override
protected Point2D getVertexLocation(GraphCutVertex v, Column col, Row<GraphCutVertex> row, Rectangle bounds) {
return getCenteredVertexLocation(v, col, row, bounds);
}