Does GDB have a built in scripting mechanism, should I code up an expect script, or is there an even better solution out there?
I’ll be sending the same sequence of commands every time and I’ll be saving the output of each command to a file (most likely using GDB’s built-in logging mechanism, unless someone has a better idea).
gdbexecutes file.gdbinitafter running.So you can add your commands to this file and see if it is OK for you.
This is an example of
.gdbinitin order to print backtrace for allf()calls: