I have a gdb user defined command that does some setup, then might do a simple job, or a complex job. The command follows this basic structure:
define mycmd
# Common setup
if ($argc == 0)
# Some simple thing a few lines long
## What goes here so I exit mycmd?
end
# A lot of lines doing a complex thing
end
Is there a C-like return I can put in place of the ## line to terminate mycmd immediately? The return, exit, quit, stop, loop_break commands don’t do what I hoped for.
There doesn’t appear to be. A possible solution is to