-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 2.2.0, Qt Creator 2.2.1, Qt Creator 2.3.0, Qt Creator 2.4.0
-
None
-
mingw on windows.
in gdbengine.cpp, there is a hardcoded Python version, which seems orthogonal to these instructions on the Qt Wiki: http://developer.qt.nokia.com/wiki/QtCreatorBuildGdb
I am trying to ship a mingw64 toolchain distribution that works out of the box with python enabled gdb. I followed the instructions in the link to the letter, but it seems QtCreator is not searching the correct directories. In the wiki article, this is the directory structure:
/ /bin /bin/gdb.exe /bin/python27.dll /lib /lib/python27 /lib/python27/<all *.py files in their correct subdirectories from the python install>
But apparently, QtCreator does not even look for this directory, but instead looks for this:
/gdb.exe /python27.dll /python2.5 /python2.5/lib /python2.5/lib/<all *.py files in their correct subdirectories from the python install>
Which is ugly for an integrated toolchain (as lib should contain .a files for GCC and binutils) and doesn't match your detailed wiki article.
Please note that the error message is extremely unhelpful, outright outdated and incorrect in the above case where I tried to set PYTHONPATH to everything that might work.
What did work (and you strangely expect), is this:
/bin /bin/gdb.exe /bin/python27.dll /bin/python2.5 /bin/python2.5/lib /bin/python2.5/lib/<python 2.7 *.py files
Please change the behavior so that QtCreator looks in
<gdblocation>/../lib/python27/
for this, as described and assumed in your wiki article. Of course PYTHONPATH should still be searched for other kinds of installs.
UPDATE: Additionally, By experimenting with a debug version that outputs the string from this call in src/plugins/debugger/gdbengine.cpp:
const QString environmentPythonPath = environment.value(pythonPathVariable); qDebug() << "PYTHONPATH = " << environmentPythonPath;
I see in my console window that the string remains empty. I have tried setting PYTHONPATH via the "set" command and through QtCreator's Project pane. Both produce an empty string. This has to be fixed.
Thanks!