debugging applets with gdb

Rob Landley rob at landley.net
Fri Aug 4 18:12:26 UTC 2006


On Friday 04 August 2006 9:23 am, Stuart Hughes wrote:
> I'd like to debug the 'df' applet as it is not outputting anything for
> the / root partition when running nfsroot and devfs.
> 
> Is there a way of building these stand-alone so you can debug them with
> gdb/gdbserver? or is there some other easy way to debug busybox applets?

I generally just stick printf() calls in there.  (Well, dprintf(2,"blah") more 
often.)  It's userspace, not the kernel. :)

And building standalone is easy.  Do a "make allnoconfig", switch on the 
applet you want, build busybox, and then "mv busybox df".

> Regards, Stuart

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list