I'm trying to dump memory from a process on my Linux machine using GDB, but I'm trying to automate this using a script.
So far I've been using the following commands (example):
$ gdb --pid [pid]
(gdb) dump memory dump_file 0x00621000 0x00622000
Is there a way to do this using only one command that I can implement in a shell script? Or is there a way to perform gdb commands using shell scripts?
Any help would be greatly appreciated :)