Bug 117063 - Debugging shell libtool can not be set correctly.
Summary: Debugging shell libtool can not be set correctly.
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: 3.3.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-25 17:18 UTC by jo
Modified: 2007-01-05 10:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jo 2005-11-25 17:18:10 UTC
Version:           3.5 (using KDE KDE 3.5.0)
Installed from:    I Don't Know
Compiler:          gcc (GCC) 3.4.1 
OS:                Linux

When trying to debug a project that uses libtool you have to specify the debugging shell as 'libtool --mode=execute'. (As shown in the faq). If you try to start the debugger Kdevelop claims: "could not locate the debugging shell 'libtool --mode=execute'"

In DebuggerPart::startDebugger() a QFileInfo info( 'libtool --mode=execute' ) is created. Then info.exists() is called, which fails because 'libtool --mode=execute' does not exist.
Comment 1 Amilcar do Carmo Lucas 2005-11-25 17:30:14 UTC
KDevelop 3.5 does not exist yet. You are probably using KDevelop 3.3 RC1
Comment 2 Vladimir Prus 2005-12-08 08:56:21 UTC
This is indeed so. Moreover, if the value of debugging shell is not an absolute path, the current code will unconditionally add project build dir to it. Probably not a good idea.
Comment 3 Olger 2006-02-11 19:34:58 UTC
KDevelop 3.3.1 on KDE 3.5.1a has this same issue. 
running SuSe Linux 10.0 OSS (x86_64) with an update to 3.5.1
gcc 4.0.2 & GDB 6.3

It seems that this bug causes the debugger not to work with automake manager type of projects. Starting with only libtool as debugging shell (project options -> debugger) 
gives the next output :

/bin/sh -c /home/olger/svndir/bcp/mntc/products/core/src/cpp/debug/libtool gdb /home/olger/svndir/bcp/mntc/products/core/src/cpp/debug/eibws/tests/mimeParseTest -fullname -quiet
(gdb) set edit off 
(gdb) set confirm off 
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require -mode=MODE be specified.
Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) 
(gdb) 
(gdb) set print static-members off 
(gdb) tty /dev/pts/3 
(gdb) set width 0 
(gdb) set height 0 
(gdb) set stop-on 1 
(gdb) handle SIG32 pass nostop noprint 
(gdb) handle SIG41 pass nostop noprint 
(gdb) handle SIG42 pass nostop noprint 
(gdb) handle SIG43 pass nostop noprint 
(gdb) set print asm-demangle on 
(gdb) set output-radix 10 
(gdb) cd /home/olger/svndir/bcp/mntc/products/core/src/cpp/debug 
(gdb) break /home/olger/svndir/bcp/mntc/products/core/src/cpp/eibws/tests/mimeParseTests.c:83 
(gdb) Process exited 

Kdevelop returns with a messagebox stating "GDB exited abnormally"

libtool --mode=execute gives the statement as described here. 
Comment 4 nicolas Mahoudeaux 2006-07-03 11:01:44 UTC
I have the very same problem.

I'm on Gentoo ~amd64.
Everything is fine with kdevelop 3.3.1, but debugging is broken in 3.3.91.

After upgrading to 3.3.91 and viewing the problem, I downgraded to 3.3.1 and it 'solves' the problem. so I think it's a problem relative to kdevelop.

 
Comment 5 Jens Dagerbo 2007-01-05 10:06:09 UTC
SVN commit 620084 by dagerbo:

Allow arguments to the debugging shell

BUG: 117063

 M  +7 -4      debuggerpart.cpp  


--- branches/kdevelop/3.4/languages/cpp/debugger/debuggerpart.cpp #620083:620084
@@ -641,17 +641,20 @@
     QString shell = DomUtil::readEntry(*projectDom(), "/kdevdebugger/general/dbgshell");
     if( !shell.isEmpty() )
     {
-        QFileInfo info( shell );
+        shell = shell.simplifyWhiteSpace();
+        QString shell_without_args = QStringList::split(QChar(' '), shell ).first();
+
+        QFileInfo info( shell_without_args );
         if( info.isRelative() )
         {
-            shell = build_dir + "/" + shell;
-            info.setFile( shell );
+            shell_without_args = build_dir + "/" + shell_without_args;
+            info.setFile( shell_without_args );
         }
         if( !info.exists() )
         {
             KMessageBox::error(
                 mainWindow()->main(),
-                i18n("Could not locate the debugging shell '%1'.").arg( shell ),
+                i18n("Could not locate the debugging shell '%1'.").arg( shell_without_args ),
                 i18n("Debugging Shell Not Found") );
             return false;
         }