[Ltrace-devel] ltrace not working on some shared objects

Patric Schmitz bzk0711 at aol.com
Thu Jul 24 14:10:31 UTC 2014


Hi everyone!

I want to use ltrace for the following purpose:

An application which I am bound to debug crashes at different points
when harmless calls into libGL are performed, like a glBegin or
glSwapBuffers. Now my assumption is that beforehand, libGL functions
were called from a different thread which potentially corrupts the
OpenGL context. I want to make sure by tracing all calls from my
application or any shared library it links into libGL and see if
functions are called from different threads. First, should the -f
option to ltrace show me the different threads or is this just for
forked processes? In that case I would have to take another approach
anyway, like having gdb break at the entry of each libGL function.

The actual problem I am having right now is that calls from a set of
libraries which I built myself are not shown at all, whatever I try.
They were built with the following compiler/linker flags, example:

compile:
/usr/bin/c++ -Wall -Wno-reorder -g -DDEBUG -fPIC
-I/home/bzk/development/vr/VistaCoreLibs -o
CMakeFiles/VistaBase.dir/VistaExceptionBase.cpp.o
-c /home/bzk/development/vr/VistaCoreLibs/VistaBase/VistaExceptionBase.cpp

link:
/usr/bin/c++  -fPIC  -Wall -Wno-reorder -g -DDEBUG   -shared
-Wl,-soname,libVistaBaseD.so -o ../lib/libVistaBaseD.so
CMakeFiles/VistaBase.dir/VistaAtomicCounter.cpp.o ...  -lrt

I went through building the same set of libraries statically and
afterwards I am able to trace the libGL calls from those libs
properly in a small test application. However, the application which I
actually want to debug does not allow me to link the static libraries
that easily, so I'm kinda stuck here. What might be reasons for ltrace
not being able to trace calls in-between linked shared objects?

Thanks in advance,
Patric

-- 
Patric Schmitz <bzk0711 at aol.com>



More information about the Ltrace-devel mailing list