Skip to content

Ghidra is a software reverse engineering (SRE) framework

GP-5789: Handle case where module appears to have zero length.

Dan92708efe40aa
diff --git a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
index c405999c0b..42c3af96dc 100644
--- a/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
+++ b/Ghidra/Debug/Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py
@@ -1280,7 +1280,10 @@ def put_modules(modules: Optional[Dict[str, util.Module]] = None,
base_base, base_addr = mapper.map(inf, m.base)
if base_base != base_addr.space:
trace.create_overlay_space(base_base, base_addr.space)
- modobj.set_value('Range', base_addr.extend(m.max - m.base))
+ if m.max == m.base:
+ modobj.set_value('Base', m.base)
+ else:
+ modobj.set_value('Range', base_addr.extend(m.max - m.base))
if sections:
sec_keys = []
for sk, s in m.sections.items():