Invoke gdb to automatically pass arguments to the program being debugged
Posted
by aistone
on Stack Overflow
See other posts from Stack Overflow
or by aistone
Published on 2008-11-26T20:54:52Z
Indexed on
2010/04/27
0:43 UTC
Read the original article
Hit count: 417
gdb
|shell-scripting
Hi,
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 finished executing the user should remain at gdb's prompt until s/he explicitly exits it.
One way to do this would be to have the script output the run command plus arguments Y to some file F and then have the script invoke gdb like this:
gdb X < F
But is there a way to do this without introducing a temporary file?
Thanks.
© Stack Overflow or respective owner