diff -Naurd kdevelop-4.2.0.orig/debuggers/gdb/debugsession.cpp kdevelop-4.2.0/debuggers/gdb/debugsession.cpp --- kdevelop-4.2.0.orig/debuggers/gdb/debugsession.cpp 2011-01-23 20:36:25.000000000 +0100 +++ kdevelop-4.2.0/debuggers/gdb/debugsession.cpp 2011-02-22 17:11:48.000000000 +0100 @@ -1024,6 +1024,11 @@ queueCmd(new GDBCommand(GDBMI::EnvironmentCd, dir)); + if(!config_dbgShell_.isEmpty()){ + QString realArgs = KShell::joinArgs(arguments); + arguments = QStringList( QString("-c")); + arguments << config_dbgShell_.toLocalFile()+QString(" ")+executable+QString(" ")+realArgs; + } // Set the run arguments if (!arguments.isEmpty()) queueCmd( @@ -1078,6 +1083,12 @@ // Note: script could contain "run" or "continue" } + else if(!config_dbgShell_.isEmpty()){ + QStringList arguments; + queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, "sh", this, &DebugSession::handleFileExecAndSymbols, true)); + raiseEvent(connected_to_program); + queueCmd(new GDBCommand(GDBMI::ExecRun)); + } else { queueCmd(new GDBCommand(GDBMI::FileExecAndSymbols, executable, this, &DebugSession::handleFileExecAndSymbols, true)); diff -Naurd kdevelop-4.2.0.orig/debuggers/gdb/gdb.cpp kdevelop-4.2.0/debuggers/gdb/gdb.cpp --- kdevelop-4.2.0.orig/debuggers/gdb/gdb.cpp 2011-01-23 20:36:25.000000000 +0100 +++ kdevelop-4.2.0/debuggers/gdb/gdb.cpp 2011-02-22 15:07:02.000000000 +0100 @@ -75,7 +75,8 @@ arguments << "--interpreter=mi2" << "-quiet"; QString shell = config.readEntry(GDBDebugger::debuggerShellEntry); - if( !shell.isEmpty() ) +// if( !shell.isEmpty() ) + if( false ) { kDebug(9012) << "have shell\n"; shell = shell.simplified();