Rockbox Technical Forums

Rockbox Development => Starting Development and Compiling => Topic started by: amr on April 07, 2010, 02:51:59 PM

Title: Debugging Rockbox Plugins
Post by: amr on April 07, 2010, 02:51:59 PM
DDD works well with me when opening rockboxui binary file and loading firmware source code files; but when trying to open a .rock file to debug a plugin, I get No Source error message: "/build/buildd/glibc-2.9/build-tree/i386-libc/csu/crti.S: No such file or directory"

Maybe this is because .rock file aren't standalone binaries, but how to make plugins source files appear for loading while opening rockboxui ?

Any ideas? Thanks.
Title: Re: Debugging Rockbox Plugins
Post by: funman on April 07, 2010, 05:39:03 PM
On the simulator, .rock are just a copy of the .elf file

To debug a plugin you can do:

Code: [Select]
% gdb ./rockboxui
(gdb) b plugin_start
Function "plugin_start" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (plugin_start) pending.
(gdb) run

Navigate in the sim, run any plugin, gdb interrupts the simulator and give you the prompt.
Title: Re: Debugging Rockbox Plugins
Post by: amr on April 07, 2010, 06:18:38 PM
Thanks funman, I've inserted a breakpoint at plugin_start in DDD and I could trace the plguin code step by step now.. and visually ..