Skip to content

Commit

Permalink
GP-4432: Fixing MzLoader Program Tree
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmkurtz committed May 22, 2024
1 parent 587307e commit 3c00ea0
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import ghidra.app.util.bin.format.mz.*;
import ghidra.app.util.importer.MessageLog;
import ghidra.program.database.mem.FileBytes;
import ghidra.program.database.module.TreeManager;
import ghidra.program.model.address.*;
import ghidra.program.model.data.DataType;
import ghidra.program.model.data.DataUtilities;
Expand Down Expand Up @@ -314,6 +315,10 @@ private void adjustSegmentStarts(Program program, TaskMonitor monitor) throws Ex
}
}
}

// Recreate the Program Tree since it may now be out of sync
program.getListing().removeTree(TreeManager.DEFAULT_TREE_NAME);
program.getListing().createRootModule(TreeManager.DEFAULT_TREE_NAME);
}

private void processRelocations(Program program, SegmentedAddressSpace space, MzExecutable mz,
Expand Down

0 comments on commit 3c00ea0

Please sign in to comment.