debugging applets with gdb
Stuart Hughes
stuarth at freescale.com
Fri Aug 4 15:04:44 UTC 2006
Answering my own question. This seems to work for me (example debugging
df, adjust your IP addr etc):
* build busybox with debugging enabled.
* On the target:
# gdbserver :1234 /bin/busybox
* On the host:
$ ddd --debugger bin/gdb rpm/BUILD/busybox-1.1.3/busybox_unstripped
(gdb) b main
(gdb) set follow-fork-mode child
(gdb) target remote 192.168.0.253:1234
(gdb) cont
(gdb) next
(gdb) set bb_applet_name="df"
(gdb) b df_main
(gdb) cont
Regards, Stuart
On Fri, 2006-08-04 at 14:23 +0100, 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?
>
> Regards, Stuart
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list