I\'d like to write a script that (under certain conditions) will execute gdb and automatically run some program X with some set of arguments Y. Once the program has finishe
gdb target -e "my-automation-commands"
my-automation-commands containing anything you would normally want to run,
break 0x123 set args "foo" bar 2 r
Not strictly a temp file, if you have a few standard init scripts ;)