| Summary: | kdevelop doesn't chekc file permissions: no error message if file not executable | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Daniel Franke <franke.daniel> |
| Component: | CPP Debugger | Assignee: | KDevelop Developers <kdevelop-devel> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | 3.0.0b2 | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Solaris | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Daniel Franke
2004-01-13 13:58:03 UTC
Hmm.. yeah, I can verify that this happens. KDevelop reports "Permission denied" when you attempt to run the program, but only shows the "code 01" string when you attempt to debug it. kdevelop-3.1.91, KDE-3.3.91 (beta1), CVS 050113 On execution: a konsole window appears that tells the user that the binary was sucessfully not executed ... *ähem* ... more or less something like this ;) debugging is still answered with "Program exited with code 01" in the status bar - no more information. (I know, that's a wierd one) SVN commit 450870 by vprus:
Before running debugger, check if application is indeed executable.
BUG: 72547
M +19 -1 gdbcontroller.cpp
--- branches/KDE/3.5/kdevelop/languages/cpp/debugger/gdbcontroller.cpp #450869:450870
@@ -1472,7 +1472,25 @@
// Note: script could contain "run" or "continue"
}
else {
- queueCmd(new GDBCommand("run", RUNCMD, NOTINFOCMD, 0));
+
+ // The program is run locally. Need the make sure it's executable,
+ // just in case.
+ QFileInfo app(application_);
+ if (app.isExecutable())
+ {
+ queueCmd(new GDBCommand("run", RUNCMD, NOTINFOCMD, 0));
+ }
+ else
+ {
+ KMessageBox::error(
+ 0, QString(
+ i18n("<b>Could not run application '%1'.</b>"
+ "<p>The application does not have the executable bit set. "
+ "Try rebuilding the project, or change permissions "
+ "manually."
+ )).arg(app.fileName()),
+ i18n("Could not run application"));
+ }
}
}
else {
|