Documentation/devtools/maemo5/maemo-debug-scripts
(New page: == Description == ''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/Valgri...) |
(devtools template) |
||
(2 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
+ | {{Devtools}} | ||
+ | |||
+ | |||
== Description == | == Description == | ||
Line 10: | Line 13: | ||
* Install a few helper scripts: | * Install a few helper scripts: | ||
- | + | ::''native-gdb'' | |
::runs the target native Gdb (by default Scratchbox runs the host binary if it exists, this script overrides that) | ::runs the target native Gdb (by default Scratchbox runs the host binary if it exists, this script overrides that) | ||
- | + | ::''debug-dep-install'' | |
::installs debug symbols for given binaries and their dependencies listed by "ldd" | ::installs debug symbols for given binaries and their dependencies listed by "ldd" | ||
- | + | ::''debug-pkg-check'' | |
::checks the correctness of a debug package for a given package | ::checks the correctness of a debug package for a given package | ||
- | + | ::''list-mmapped-libs'' | |
::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 | ::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 | ||
- | + | ::''run-with-valgrind'' | |
::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 memcheck plugin (memory access errors, leaks etc) so that all suitable options are set for it | ||
- | + | ::''run-with-callgrind'' | |
::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 callgrind plugin (performance profiling) so that all suitable options are set for it | ||
- | + | ::''run-with-massif'' | |
::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 massif plugin (memory usage visualization) so that all suitable options are set for it | ||
- | + | ::''run-with-helgrind'' | |
::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 Valgrind helgrind plugin (race condition detector for threaded programs) so that all suitable options are set | ||
- | + | ::''run-with-strace'' | |
::helper script for running a binary with strace. Like above helper scripts, handles maemo-launched binaries automatically | ::helper script for running a binary with strace. Like above helper scripts, handles maemo-launched binaries automatically | ||
Line 62: | Line 65: | ||
[[Documentation/devtools/maemo5/gdb|gdb]], [[Documentation/devtools/maemo5/valgrind|valgrind]], [[Documentation/devtools/maemo5/strace|strace]] | [[Documentation/devtools/maemo5/gdb|gdb]], [[Documentation/devtools/maemo5/valgrind|valgrind]], [[Documentation/devtools/maemo5/strace|strace]] | ||
+ | |||
+ | [[Category:Fremantle]] |
Latest revision as of 15:13, 11 March 2010
This article documents a developer tool. A list of available devtools is available, together with installation instructions. |
Contents |
[edit] Description
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:
- native-gdb
- runs the target native Gdb (by default Scratchbox runs the host binary if it exists, this script overrides that)
- debug-dep-install
- installs debug symbols for given binaries and their dependencies listed by "ldd"
- debug-pkg-check
- checks the correctness of a debug package for a given package
- list-mmapped-libs
- 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
- run-with-valgrind
- helper script for running a binary with Valgrind memcheck plugin (memory access errors, leaks etc) so that all suitable options are set for it
- run-with-callgrind
- helper script for running a binary with Valgrind callgrind plugin (performance profiling) so that all suitable options are set for it
- run-with-massif
- helper script for running a binary with Valgrind massif plugin (memory usage visualization) so that all suitable options are set for it
- run-with-helgrind
- helper script for running a binary with Valgrind helgrind plugin (race condition detector for threaded programs) so that all suitable options are set
- run-with-strace
- helper script for running a binary with strace. Like above helper scripts, handles maemo-launched binaries automatically
[edit] Packages
source: maemo-debug-scripts
binary: maemo-debug-scripts
[edit] Usage Examples
-
[edit] Links
[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)
[edit] See Also
- This page was last modified on 11 March 2010, at 15:13.
- This page has been accessed 8,187 times.