Skip to content
Snippets Groups Projects
Commit 449d55cf authored by Anton Anikin's avatar Anton Anikin Committed by Kevin Funk
Browse files

Fix KDevelop crashes when trying to debug from command-line

Fixes the crash in KDE bug #367837 that is caused by starting
debugging session from command line:

kdevelop -d gdb dolphin

This caused to ASSERT: QFile::exists(). Current version fix it
by searching full paths for such binaries.

BUG:367837
FIXED-IN: 5.0.1
(cherry picked from commit b386fb1c)
parent 24871784
No related branches found
No related tags found
No related merge requests found
......@@ -566,7 +566,19 @@ int main( int argc, char *argv[] )
qerr << endl << i18nc("@info:shell", "Specify the binary you want to debug.") << endl;
return 1;
}
debugeeName = i18n("Debug %1", QUrl( debugArgs.first() ).fileName());
QFileInfo binaryInfo(debugArgs.first());
if (!binaryInfo.exists()) {
binaryInfo = QStandardPaths::findExecutable(debugArgs.first());
if (!binaryInfo.exists()) {
QTextStream qerr(stderr);
qerr << endl << i18nc("@info:shell", "Specified binary does not exists.") << endl;
return 1;
}
}
debugArgs.first() = binaryInfo.absoluteFilePath();
debugeeName = i18n("Debug %1", binaryInfo.fileName());
session = debugeeName;
} else if ( parser.isSet("new-session") )
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment