Recently I was tracking down why GNU autoconf configuration script
wasn't setting things the right way.
To help me, I thought I'd use bashdb and rather than call it initially
insert a call to the debugger somewhere near the portion that is
failing. That way the script runs full speed up until then. Alas,
since configure redirects input and output it took a little bit of
work to figure out how to accomplish this.
What's really needed is a command option to bashdb and bashdb-trace to
specify where to get input. I'll probably add this sometime.
Until then source'ing the tty seems to work.
First to configure I added this:
# Somewhere near where I want to bring in the debugger....
. /usr/local/share/bashdb/bashdb-trace
_Dbg_debugger # This is where
In theory this should work. But since stdin was closed calling the
debugger just caused the program to quit. So I added to
my ~/.bashdbinit this:
source /dev/pts/5
I got /dev/pts/5 from the tty command of the shell that I was running
from. You'll have to adjust to whatever the right value is for the
time you need to run this.
Again down the line I'll probably add a --tty option (same as gdb has)
so this workaround is not needed. When this is done I image you'd get
that option in on the source command:
. /usr/local/share/bashdb/bashdb-trace --tty /dev/pts/5
|