Results 1 to 2 of 2
I want to spawn a GDB session from bash script and keep it working to interact it from outside. But when I start it in background (with '&' sigil) Code: ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-22-2010 #1
- Join Date
- Apr 2010
- Novosibirsk, Russia
Gdb terminates when spawned from shell
I want to spawn a GDB session from bash script and keep it working to interact it from outside. But when I start it in background (with '&' sigil)
gdb -x gdb_script.txt ./a.out < gdb_pipe.fifo &
Breakpoint 33, main (argc=1, argv=0xbffff0f4) at main.c:53 ---Type <return> to continue, or q <return> to quit---53 read_main_config(); (gdb) quit A debugging session is active. Inferior 1 [process 5957] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal]
- 11-23-2010 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
GDB has to run in the foreground, unless you redirect stdin, stdout, and stderr.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!