From 92708efe40aac01c27a48785d8707280d94fbd11 Mon Sep 17 00:00:00 2001 From: Dan <46821332+nsadeveloper789@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:33:48 +0000 Subject: [PATCH] GP-5789: Handle case where module appears to have zero length. --- .../Debugger-agent-gdb/src/main/py/src/ghidragdb/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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():