GDB – how to step into uClibc if you have .debug files

1. Make sure your debuginfo files are part of LD_LIBRARY_PATH. To do this, either a) add the path where you stored the .debug files to your LD_LIBRARY_PATH environment variable, e.g.: $ export LD_LIBRARY_PATH=/opt/STM/STLinux-2.3/devkit/sh4_uclibc/target/usr/lib/debug:/opt/STM/STLinux-2.3/devkit/sh4_uclibc/bin/../lib:/opt/STM/STMCR1.5.0/lib:/opt/STM/STLinux-2.3/devkit/sh4_uclibc/bin/../../../host/stmc/lib Then restart gdb. OR b) start gdb and set the LD_LIBRARY_PATH from within gdb: (gdb) set env LD_LIBRARY_PATH /opt/STM/STLinux-2.3/devkit/sh4_uclibc/target/usr/lib/debug:/opt/STM/STLinux-2.3/devkit/sh4_uclibc/bin/../lib:/opt/STM/STMCR1.5.0/lib:/opt/STM/STLinux-2.3/devkit/sh4_uclibc/bin/../../../host/stmc/lib In my case […]

Continue reading