Linux Debugging: Listing Shared Libraries at Runtime

I had a library (a python plugin) that crashed and outputted the “very useful”: illegal instruction I tried pdb (the Python Debugger) to find the issue without success. So I tried to add some printf to this library but none were outputted at runtime.  So I guessed the illegal instructions was generated by the shared libraries. Let’s see how many libraries we’ve got: ldd libbrowsernode.so | wc -l 125 Oh dear!… 125 libraries.. This is where panic sets in. Luckily, there is a simple way to list the dynamic libraries as they are loaded (and some more useful info). Simply set: export LD_DEBUG=files before running your program. This is extremely verbose, so I recommend you redirect the output to a file. This method allowed me to find undefined symbols during dynamic libraries load time with errors such as: opening file=/usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so [0]; direct_opencount=1 14121: 14121:     /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so: error: symbol lookup error: undefined […]

Linux Kernel Debugging – Linaro Connect Q4 2011

Linaro Connect Q4.2011 takes place on the 31 October – 4 November 2011 in Orlando. In the video below, Linaro toolchain developers asked kernel developers about their potential needs for kernel debugging. Several options to improve the kernel debugging experience were discussed. In particular, the toolchain group will make sure that OpenOCD works at least on one of the member boards to allow for easy debugging through JTAG. They also mentioned support for o-profile. This session was an opportunity to review debugging techniques used by kernel developers. It also allowed most participants to discover the GDB Text User Interface (GDB TUI), a very convenient way to interact with GDB, without having to go through heavyweight environments like Eclipse. You can follow this subject on Blueprints for Toolchain support for Kernel Debugging on Linaro website. The audio is quite poor, so use some headphones or boost the volume to hear anything. […]

Android Debugging on MIPS Platform with Viosoft Arriba Debugger

I’ve recently attended a webinar organized by EETIMES with MIPS and Viosoft entitled “Android Platform: It’s Not Just For Handsets Anymore” on the 26th October 2010. You can now register for the on demand version at http://seminar2.techonline.com/s/mips_oct0610 The purpose of this web conference was to explain the status of Android for Set-top-box and MID development, the complexity of debugging kernel, java and application in an Android system as well as showcasing Viosoft Arriba to debug Android on MIPS. If you ever develop Android on Sigma Designs SMP864x/SMP865x platforms you’ll probably use Viosoft Arriba. You may refer to the following material Comprehensive Development and Debug Coverage for Linux and Android on the MIPS Architecture that contains the slides used during the presentation. Rick Leatherman – Vice President, Development Tools at MIPS Technologies, Inc – firstly described Android architecture with the application level, Library/Android (Dalvik), and the kernel. He then explained the […]

UP 7000 x86 SBC