I am trying to execute two commands at once in gdb:
finish; next
I tried using the \';\' to separate the commands but gdb did not let me do
I don't believe so (but I may be wrong). You can do something like this:
(gdb) define fn > finish > next > end
And then just type:
(gdb) fn
You can put this in your ~/.gdbinit file as well so it is always available.
~/.gdbinit