diff --git a/pwndbg/commands/__init__.py b/pwndbg/commands/__init__.py index a1be14f88..69b4d3fe8 100644 --- a/pwndbg/commands/__init__.py +++ b/pwndbg/commands/__init__.py @@ -7,6 +7,7 @@ import gdb import pwndbg.chain import pwndbg.color +import pwndbg.color.message as message import pwndbg.enhance import pwndbg.exception import pwndbg.hexdump @@ -209,7 +210,10 @@ def OnlyWithFile(function): if pwndbg.proc.exe: return function(*a, **kw) else: - print("%s: There is no file loaded." % function.__name__) + if pwndbg.qemu.is_qemu(): + print(message.error("Could not determine the target binary on QEMU.")) + else: + print(message.error("%s: There is no file loaded." % function.__name__)) return _OnlyWithFile