debugging applications with libtool

Alexander Dymo dymo at mk.ukrtelecom.ua
Mon Jun 5 17:13:15 UTC 2006


Several people have seen this problem when they were unable to debug kdevelop
from itself. The problem occurs when the debug shell is libtool and autotools
build system produces libtool wrapper scripts to lauch the application.

To reproduce, create any kde application from the template, add a subproject,
add a libtool library installed in lib and build. You will see that
$(top_builddir)/src/appname is not an executable anymore, but rather a libtool
wrapper script. Same applies to KDevelop source tree.

But the debugger apparently tries to set this script as the executable 
output:
kdevelop (debugger): COMMANDS: 1 in queue, 1 executing
kdevelop (debugger): STATE: -s_waitForWrite
kdevelop (debugger): REPLY: 
&"file /home/gremlin/projects/tests/tk334/debug/src/tk334\n"
kdevelop (debugger): COMMANDS: 1 in queue, 1 executing
kdevelop (debugger): REPLY: 
&"\"/home/gremlin/projects/tests/tk334/debug/src/tk334\": not in executable 
format: File format not recognized\n"

This happens because KDevelop launches the debugger with:
/bin/sh -c /home/gremlin/projects/tests/tk334/debug/libtool gdb 
--interpreter=mi2 -quiet
instead of 
libtool gdb --interpreter=mi2 -quiet src/tk334

Notice the path to the libtool wrapper script in the command line.
Vladimir, can you please fix that?




More information about the KDevelop-devel mailing list