Debuger is not working.

Amilcar do Carmo Lucas amilcar at ida.ing.tu-bs.de
Tue Mar 25 17:45:08 UTC 2003


The problem is that gdb isn't even started! :(
Although if I issue by hand the command line that it builds in a konsole 
it runs fine.

The hole problem seams to be the dbgProcess_  ,it doesn't start.

The fix should be trivial, but I never worked with this KProcess stuff 
before.

Amilcar



Amilcar do Carmo Lucas wrote:

> The debugger is not working.
>
> I attach a patch that solves the first part of the problem (lack of 
> spaces in the command line string)
> but the rest is up to the gdb gurus.
>
>------------------------------------------------------------------------
>
>Index: parts/debugger/gdbcontroller.cpp
>===================================================================
>RCS file: /home/kde/kdevelop/parts/debugger/gdbcontroller.cpp,v
>retrieving revision 1.23
>diff -u -r1.23 gdbcontroller.cpp
>--- parts/debugger/gdbcontroller.cpp	25 Mar 2003 01:03:01 -0000	1.23
>+++ parts/debugger/gdbcontroller.cpp	25 Mar 2003 15:16:11 -0000
>@@ -1168,12 +1168,13 @@
>     connect( dbgProcess_, SIGNAL(processExited(KProcess*)),
>              this,        SLOT(slotDbgProcessExited(KProcess*)) );
> 
>+    QString debug_command_line;
>     if (!shell.isEmpty())
>-        *dbgProcess_ << "/bin/sh" << "-c"
>-        << shell + " " +config_gdbPath_ + "gdb " + application + " -fullname -nx -quiet";
>-    else
>-        *dbgProcess_ << config_gdbPath_ + "gdb" << application << "-fullname" << "-nx" << "-quiet";
>-
>+        debug_command_line = "/bin/sh -c " + shell + " ";
>+    debug_command_line += config_gdbPath_ + "gdb " + application + " -fullname -nx -quiet";
>+    kdDebug() << "Debug command line:" << debug_command_line << endl;
>+    
>+    *dbgProcess_ << debug_command_line;
>     dbgProcess_->start( KProcess::NotifyOnExit,
>                         KProcess::Communication(KProcess::All));
> 
>  
>







More information about the KDevelop-devel mailing list