Run the inferior till it ends

Scialla via Gdb <[email protected]> Thu, 5 Mar 2026 20:39:16 +0100
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
I'm trying to run gdb in batch mode with a gdb script, that is supposed 
to run the inferior until this one terminates. Is the following pattern 
correct:

set breakpoint pending on

break foo
commands
   .. do something ...
   continue
end

# do not stop at signals
handle all nostop noprint pass
run

while $_isvoid($_exitcode) && $_isvoid($_exitsignal)
     continue
end

quit $_exitcode


Thanks,
Scialla