Debugging a Bash Shell Script
I have a program that gets executed via a Makefile. One enters make rtlinux, and the make really just gos to a line with:
rtlinux start
rtlinux is a shell script. I believe somewhere in the script that something goes awry and hangs Linux. I'd like to get some idea where in the script it goes wrong. I know I could use make -d rtlinux to get some info from make, but how can I get it out of rtlinux? I placed a number of echo stmts in it with the first one like: echo "Starting dbg" > dbgout, and subsequent ones like echo "Point A" >> dbgout. When the procedure hung again, I hit reset and looked for dbgout, but it wasn't where I expected it to be.
Maybe I need some 'flush' in the rtlinux shell, or perhaps there's a flag I can set?
|