diff options
Diffstat (limited to 'src/plugins/debugger/gdb/gdbengine.cpp')
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 8a98c0e433..23ebc1df94 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3969,11 +3969,14 @@ void GdbEngine::handleGdbStarted() //if (terminal()->isUsable()) // runCommand({"set inferior-tty " + QString::fromUtf8(terminal()->slaveDevice())}); - const QString uninstalledData = rp.debugger.command.executable().parentDir() - .pathAppended("data-directory/python").path(); - runCommand({"python sys.path.insert(1, '" + rp.dumperPath.path() + "')"}); - runCommand({"python sys.path.append('" + uninstalledData + "')"}); + + // This is useful (only) in custom gdb builds that did not run 'make install' + const FilePath uninstalledData = rp.debugger.command.executable().parentDir() + / "data-directory/python"; + if (uninstalledData.exists()) + runCommand({"python sys.path.append('" + uninstalledData.path() + "')"}); + runCommand({"python from gdbbridge import *"}); const QString path = debuggerSettings()->extraDumperFile.value(); |