[BusyBox] BusyBox sh w/ GDB

Bryan Rittmeyer bryan at ixiacom.com
Sat Jan 13 21:32:39 UTC 2001


Hi guys,

I've spent the last couple days trying to get GDB running on my SH4
embedded target, using BusyBox 0.48 and 0.49-pre CVS... and I suspect
the BusyBox shell has a bug (?) which prevents output from a debugged
process from ever reaching the terminal. GDB creates the debugged
process with "/bin/sh -c exec [executable name]" However, the BusyBox
shell, when spawned that way, seems to burry any console output:

[@(none) /]# /bin/sh -c exec /bin/gdbtest
[@(none) /]#

Interestingly, this works:

[@(none) /]# /bin/sh -c "exec /bin/gdbtest" 
running foo...
foo:0
foo:1
foo:2
foo:3
foo:4
foo:5
foo:6
foo:7
foo:8
foo:9
running bar...
bar:10
bar:9
bar:8
bar:7
bar:6
bar:5
bar:4
bar:3
bar:2
bar:1
exiting...
[@(none) /]# 

I suspect this may have something to do with how "exec" is parsed for in
the shell... can anybody suggest the correct way to fix it? I have
thought of some temporary hacks to sh.c, but I'd like to do it properly.

Regards,

Bryan

-- 
Bryan Rittmeyer
mailto:bryan at ixiacom.com
Ixia Communications
26601 W. Agoura Rd.
Calabasas, CA 91302





More information about the busybox mailing list