title: How do I stop a gdb user defined command in the middle?
body: <p>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:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>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.</p>