| This article documents a developer tool.
A list of available devtools is available, together with installation instructions.
maemo-debug-scripts is a convenience package for maemo developers needing to debug their programs. The package will:
- Post-install a symlink required by Gdb/Valgrind/Oprofile to find the debug symbol files in Scratchbox. The files are installed in /usr/lib/debug/<library path>, but in Scratchbox the library realpaths are /targets/<target name>/<library path>.
- Depend from libc6-dbg. Without libc6-dbg threads cannot be debugged with Gdb and Valgrind reports redundant errors for the dynamic loader (its error suppressions for /lib/ld functions can match them only with the debug symbol file as stripped binary doesn't contain static function names)
- Depend from target native Gdb. The Scratchbox host version of Gdb (cross-gdb) doesn't know how to load the correct thread library (even on x86) and it cannot debug ARM core-dumps. Native one can.
- Install a few helper scripts:
- runs the target native Gdb (by default Scratchbox runs the host binary if it exists, this script overrides that)
- installs debug symbols for given binaries and their dependencies listed by "ldd"
- checks the correctness of a debug package for a given package
- lists all packages containing libs and binaries that given process uses. It can be used to find out the libraries mmap()ed through dlopen that "ldd" (used by debug-deb-install script) doesn't find
- helper script for running a binary with Valgrind memcheck plugin (memory access errors, leaks etc) so that all suitable options are set for it
- helper script for running a binary with Valgrind callgrind plugin (performance profiling) so that all suitable options are set for it
- helper script for running a binary with Valgrind massif plugin (memory usage visualization) so that all suitable options are set for it
- helper script for running a binary with Valgrind helgrind plugin (race condition detector for threaded programs) so that all suitable options are set
- helper script for running a binary with strace. Like above helper scripts, handles maemo-launched binaries automatically
 Usage Examples
[debug-dep-install man page](/development/documentation/man_pages/debug-dep-install.html)
[debug-pkg-check man page](/development/documentation/man_pages/debug-pkg-check.html)
[list-mmapped-libs man page](/development/documentation/man_pages/list-mmapped-libs.html)
[native-gdb man page](/development/documentation/man_pages/native-gdb.html)
[run-with-callgrind man page](/development/documentation/man_pages/run-with-callgrind.html)
[run-with-massif man page](/development/documentation/man_pages/run-with-massif.html)
[run-with-memcheck man page](/development/documentation/man_pages/run-with-memcheck.html)
[run-with-helgrind man page](/development/documentation/man_pages/run-with-helgrind.html)
[run-with-strace man page](/development/documentation/man_pages/run-with-strace.html)
 See Also
- This page was last modified on 11 March 2010, at 15:13.
- This page has been accessed 1,978 times.