I have been trying around getting one keybinding
<F7> to perform one
gud-step command if a debugging process is running. If it is not running it shall perform
I am not very familiar with gdb/gud yet, so while trying to get
gdb-running to work as a condition for my defun I am exposed to lisp argument errors, that 2 arguments are required (string-or-char-p and nil), where the first argument is a token, as it seems.
In the end my goal is to use
<F7> to invoke a
gud-run and to step-through with the same key afterwards, after reaching a breakpoint.
Following snippet is my first attempt. It becomes obvious that
gdb-running is missing 2 arguments as aforementioned.
(require 'gud) (defun my-gud-run-or-step () (interactive) (if (gdb-running) (gud-step nil) (gud-run nil))) (global-set-key (kbd "<f7>") 'my-gud-run-or-step)