How do I run a program with commandline arguments using GDB within a Bash script?
You can run gdb with –args parameter: gdb –args executablename arg1 arg2 arg3 If you are doing this often (e.g. when running GDB from a script), you might want to consider the following arguments to automate things further. First, you can place your GDB commands (such as ‘run’) in a text file and provide the … Read more