Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-1840: Fixed issue launching emulator with duplicate block names

Dan60e912f313a9
diff --git a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/emulation/ProgramEmulationUtils.java b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/emulation/ProgramEmulationUtils.java
index b0719d43cb..e4dc9e6c65 100644
--- a/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/emulation/ProgramEmulationUtils.java
+++ b/Ghidra/Debug/Debugger/src/main/java/ghidra/app/plugin/core/debug/service/emulation/ProgramEmulationUtils.java
@@ -152,10 +152,10 @@ public enum ProgramEmulationUtils {
String modName = getModuleName(program);
// TODO: Do I populate modules, since the mapping will already be done?
+ String path = "Modules[" + modName + "].Sections[" + block.getName() + "-" +
+ block.getStart() + "]";
trace.getMemoryManager()
- .createRegion(
- "Modules[" + modName + "].Sections[" + block.getName() + "]",
- snapshot.getKey(), range, getRegionFlags(block));
+ .createRegion(path, snapshot.getKey(), range, getRegionFlags(block));
}
DebuggerStaticMappingUtils.addMapping(
new DefaultTraceLocation(trace, null, Range.atLeast(snapshot.getKey()), min),