From e9b34e096a38165b3586ff177f5cf12df5915a31 Mon Sep 17 00:00:00 2001 From: pompolic <pompolic@special-circumstanc.es> Date: Mon, 7 Jun 2021 21:55:52 +0200 Subject: [PATCH] Fix spurious warning Although the command runs, invoking "continue" without an inferior running produces an error message with no other feedback --- gdb-port/utility-commands.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb-port/utility-commands.py b/gdb-port/utility-commands.py index 4059c1d..f446ec8 100644 --- a/gdb-port/utility-commands.py +++ b/gdb-port/utility-commands.py @@ -26,7 +26,11 @@ class HammerParseStep(gdb.Command): # step_counter -= 1 # else: # retval = True - gdb.execute("continue") + + # only execute "continue" if inferior is present and running, to avoid a warning + # don't know if there's a more reliable way to tell this + if gdb.selected_inferior().pid > 0: + gdb.execute("continue") HammerParseStep() -- GitLab