forked from qt-creator/qt-creator
Debugger: Avoid crash when attach to process fails
If attaching to the current's project running executable fails due crashing inferior the run tool is cleaned up already when trying to fetch its run parameters. Circumvent by checking whether run tool is still accessible. Change-Id: I56f3d841d77d0513806a2b91357841f160f74ed3 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -4034,7 +4034,10 @@ void GdbEngine::reloadDebuggingHelpers()
|
||||
|
||||
void GdbEngine::handleGdbError(QProcess::ProcessError error)
|
||||
{
|
||||
QString program = runParameters().debugger.executable;
|
||||
QString program;
|
||||
// avoid accessing invalid memory if the process crashed
|
||||
if (runTool())
|
||||
program = runParameters().debugger.executable;
|
||||
QString msg = RunWorker::userMessageForProcessError(error, program);
|
||||
QString errorString = m_gdbProc.errorString();
|
||||
if (!errorString.isEmpty())
|
||||
|
Reference in New Issue
Block a user