Friday, March 21, 2008

gdb 6.0+ pain

Turns out reading from a pipe no longer works with gdb 6.0+ ... So something like the following won't work:


gdb -x /dev/stdin -q [program] [pid] <<EOF
set prompt
where
detach
quit
EOF


Instead, you now have to put those commands into a temporary file, and use


gdb -x /tmp/.stacktrace.gdb -q [program] [pid]