Multiple commands in gdb separated by some sort of delimiter ';'?

前端 未结 6 1414
故里飘歌
故里飘歌 2020-12-12 12:53

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

6条回答
  •  情深已故
    2020-12-12 13:11

    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.

提交回复
热议问题