Summary: | KDevelop should display error if gdb can't run | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | djarvie |
Component: | CPP Debugger | Assignee: | Matt Rogers <mattr> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | franke.daniel, kdevelop-bugs-null, linus |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
djarvie
2001-04-08 18:19:29 UTC
Handled better in Gideon By the look of 62832 and 72546 it is not solved yet. *** Bug 62832 has been marked as a duplicate of this bug. *** *** Bug 72546 has been marked as a duplicate of this bug. *** Bug. CVS commit by mattr: Display a message that GDB could not be found if GDB is not currently installed on the system. Fixes bug 23909 BUG: 23909 M +12 -0 debuggerpart.cpp 1.104 M +3 -0 debuggerpart.h 1.30 M +4 -1 gdbcontroller.cpp 1.66 M +1 -0 gdbcontroller.h 1.27 --- kdevelop/languages/cpp/debugger/debuggerpart.cpp #1.103:1.104 @@ -554,4 +554,6 @@ void DebuggerPart::setupController() connect( controller, SIGNAL(showStepInSource(const QString&, int, const QString&)), this, SLOT(slotShowStep(const QString&, int))); + connect( controller, SIGNAL(debuggerRunError(int)), + this, SLOT(errRunningDebugger(int))); // controller -> procLineMaker @@ -687,4 +689,14 @@ void DebuggerPart::slotStopDebugger() } +void DebuggerPart::errRunningDebugger(int errorCode) +{ + if (errorCode == 127) + { + KMessageBox::error(mainWindow()->main(), i18n("GDB could not be found. Please make sure it is installed" + " and in the path and try again"), i18n("Debugger not found")); + } + slotStopDebugger(); +} + void DebuggerPart::projectClosed() { --- kdevelop/languages/cpp/debugger/debuggerpart.h #1.29:1.30 @@ -89,4 +89,7 @@ private slots: void slotCloseDrKonqi(); + //! There was an error running the debugger + void errRunningDebugger( int errorCode ); + private: KDevAppFrontend *appFrontend(); --- kdevelop/languages/cpp/debugger/gdbcontroller.cpp #1.65:1.66 @@ -2018,6 +2018,9 @@ void GDBController::slotDbgWroteStdin(KP // ************************************************************************** -void GDBController::slotDbgProcessExited(KProcess*) +void GDBController::slotDbgProcessExited(KProcess* process) { + if ( process->exitStatus() == 127 ) + emit debuggerRunError(127); + destroyCmds(); state_ = s_appNotStarted|s_programExited|(state_&(s_viewLocals|s_shuttingDown)); --- kdevelop/languages/cpp/debugger/gdbcontroller.h #1.26:1.27 @@ -132,4 +132,5 @@ signals: void acceptPendingBPs (); void unableToSetBPNow (int BPNo); + void debuggerRunError(int errorCode); private: |