forked from qt-creator/qt-creator
Debugger: use TemporaryDirectory for CMake debugger
Hardcoding "/tmp" is not the best idea. Change-Id: I9d5abd48bdf37d842d790db5ae5c4a7b994075e1 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
#include <utils/async.h>
|
#include <utils/async.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/temporarydirectory.h>
|
||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
|
|
||||||
@@ -97,9 +98,9 @@ void FileApiReader::parse(bool forceCMakeRun,
|
|||||||
+ m_parameters.additionalCMakeArguments)
|
+ m_parameters.additionalCMakeArguments)
|
||||||
: QStringList());
|
: QStringList());
|
||||||
if (debugging) {
|
if (debugging) {
|
||||||
FilePath file = FilePath::fromString("/tmp/cmake-dap.sock");
|
FilePath file = FilePath::fromString(TemporaryDirectory::masterDirectoryPath() + "/cmake-dap.sock");
|
||||||
file.removeFile();
|
file.removeFile();
|
||||||
args << "--debugger" << "--debugger-pipe=/tmp/cmake-dap.sock";
|
args << "--debugger" << "--debugger-pipe=" + file.path();
|
||||||
}
|
}
|
||||||
|
|
||||||
qCDebug(cmakeFileApiMode) << "Parameters request these CMake arguments:" << args;
|
qCDebug(cmakeFileApiMode) << "Parameters request these CMake arguments:" << args;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <utils/environment.h>
|
#include <utils/environment.h>
|
||||||
#include <utils/process.h>
|
#include <utils/process.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/temporarydirectory.h>
|
||||||
|
|
||||||
#include <coreplugin/editormanager/editormanager.h>
|
#include <coreplugin/editormanager/editormanager.h>
|
||||||
#include <coreplugin/editormanager/ieditor.h>
|
#include <coreplugin/editormanager/ieditor.h>
|
||||||
@@ -253,7 +254,8 @@ void DapEngine::setupEngine()
|
|||||||
qCDebug(dapEngineLog) << "build system name" << ProjectExplorer::ProjectTree::currentBuildSystem()->name();
|
qCDebug(dapEngineLog) << "build system name" << ProjectExplorer::ProjectTree::currentBuildSystem()->name();
|
||||||
|
|
||||||
m_nextBreakpointId = 0;
|
m_nextBreakpointId = 0;
|
||||||
m_dataGenerator = std::make_unique<LocalSocketDataProvider>("/tmp/cmake-dap.sock");
|
m_dataGenerator = std::make_unique<LocalSocketDataProvider>(
|
||||||
|
TemporaryDirectory::masterDirectoryPath() + "/cmake-dap.sock");
|
||||||
connectDataGeneratorSignals();
|
connectDataGeneratorSignals();
|
||||||
|
|
||||||
connect(ProjectExplorer::ProjectTree::currentBuildSystem(),
|
connect(ProjectExplorer::ProjectTree::currentBuildSystem(),
|
||||||
|
|||||||
Reference in New Issue
Block a user