Is it possible to run multiple commands in gdb such as the following:
# step instruction and then print what I want to see again
>>> si && x/bt $rsi
If so, how can it be done?
If your gdb includes python, follow this post to add a user command in your .gdbinit file: https://stackoverflow.com/a/51804606/11873710
Usage example:
(gdb) cmds echo hi ; echo bye
hi
bye
siandx/bt $rsibefore, and they are now in your command history, you can go back in the history tosiand press ctrl-o. This executes the command, just like [enter], but then automatically goes to thex/bt $rsicommand.