can't debug hand-built Qt Frameworks
-
while i reiterate that i am very grateful for your continuing to try to help, i still would more appreciate explicit instructions, rather than hints.
i understand the socratic method, to answer a question with a question, to make me think, to hope to teach, to leave some to the student to try to figure out. sure. that has its place. but i think we could (i could) get a lot more done in a day if you could help by giving a concrete example. also you wouldn't have to keep coming back and giving me more hints. :) save us both some time.
so... i did take your hints and i've run as far as i can with them. i've tried to make MY directory layout look just like the one that comes with Qt Creator. My new commands are this:
> cd <path_to>/Qt5_Source > git clone git://code.qt.io/qt/qt5.git > mv ./qt5 ./Src > cd Src > git checkout 5.15.2 > perl init-repository --module-subset=default,-qtwebchannel,-qtwebengine,-qtwebglplugin,-qtwebsockets,-qtwebview,-qt3d,-qtcharts,-qtquick3d,-qtquickcontrols,-qtquickcontrols2,-qtquicktimeline > cd .. > mkdir build > cd build > ../Src/configure -prefix ../clang_64 -force-debug-info -debug-and-release -opensource -nomake examples -nomake tests -confirm-license > make -j12 > make install
so, even though i did
-force-debug-info
and-debug-and-release
, the.../Qt5_Source/clang_64/lib
directory still does NOT contain any debug info files (.dSYM).so my original question still is posed: how do i debug these guys?
again i BEG you: if any of my commands above are WRONG, please provide CORRECTED examples, not hints. as you can see, i'm NOT GOOD at deciphering hints, i much prefer instructions.
note that an end goal will be to have "qt.pro" (or whatever the right project(s) are) as a depencency of my own project, such that, in Qt Creator, i can edit code in any of the Qt Frameworks, and just hit run, and it will compile and stage the Qt stuff, then compile and link my project to that, and run my project.
thanks so much!
-dave
ps: unfortunately, also this happened after
make install
assembled a lot of stuff intobin
:cd qhelpgenerator/ && ( test -e Makefile || /Volumes/Developer/depot/Qt5_Source/build/qtbase/bin/qmake -o Makefile /Volumes/Developer/depot/Qt5_Source/Src/qttools/src/assistant/qhelpgenerator/qhelpgenerator.pro ) && /Applications/Xcode_10.3.app/Contents/Developer/usr/bin/make -f Makefile install make[4]: *** No rule to make target `install'. Stop. make[3]: *** [sub-qhelpgenerator-install_subtargets] Error 2 make[2]: *** [sub-assistant-install_subtargets] Error 2 make[1]: *** [sub-src-install_subtargets] Error 2 make: *** [module-qttools-install_subtargets] Error 2
-
okay, so after some more testing i see that i CAN in fact, now debug, and set breakpoints within the Qt code base. This is true even though i do not see any ".dSYM" files.
so this question is answered. thanks so much for your help. :D
not sure why QHelpGenerator failed to build, or what the consequences are, if any. if you have any ideas on that please let me know.
(also i apologize if helping me was frustrating, i'm doing my best and sometimes i have a hard time understanding stuff. but seems i got it in the end.)
-
AFAIR (but might be wrong), the .dSYM file are generated when you do a "release with debug symbol" build.
I do not know for QHelpGenerator, the failure source is upper in the build log.
Glad you can debug as you wish :-)
-
and how does one do a "release with debug symbols" build?
-
If memory serves well, something like "-release -force-debug-info".
-
if i do
-release
does that mean i do NOT do-debug-and-release
? ie: are they mutually exclusive? -
I do not remember which one takes precedents over the other. You can try to mix debug-and-release with force-bebug-info.
-
My final commands were:
cd /Volumes/Developer/depot/Qt5_Source git clone git://code.qt.io/qt/qt5.git mv ./qt5 ./Src cd Src git checkout 5.15.2 perl init-repository --module-subset=default,-qtwebengine,-qt3d,-qtcharts,-qtquick3d,-qtquickcontrols,-qtquickcontrols2,-qtquicktimeline cd .. mkdir build cd build ../Src/configure -prefix ../clang_64 -force-debug-info -separate-debug-info -debug-and-release -opensource -nomake examples -nomake tests -confirm-license make -j12 make -j1 install
no errors, and i had separate debug .dSYM files. haven't tested release yet.
By the way it took almost a week, half a dozen web pages, and almost two dozen back-and-forth replies in the forums to arrive at the above formula.
The fact that there is no such example just posted on the documentation web site is just stunning to me.
:)
-
i take it back. now, all i did was change two strings in one file:
in the fileavfvideorenderercontrol.mm
i changed line 273 to read:qWarning("Failed to activate video surface (OpenGL)");
and changed line 298 to read:
qWarning("Failed to activate video surface (QImage)");
Previously, they both had the same warning, so you could not know which one was hit by just seeing the console output.
then, i tried to compile that one module:
cd /Volumes/Developer/depot/Qt5_Source/build/qtmultimedia/src/plugins/avfoundation make -j12 make install
and it SEEMED to do SOMETHING, no errors.
but now when i run my app, i can't make ANY breakpoints resolve, and the warning, when fired, does NOT contain my updated string.i even then tried to make then make install from the root, but same problem: breakpoints don't resolve, can't debug into Qt frameworks :(
just FYI i have edited my kit->environment to have this line:
DYLD_IMAGE_SUFFIX=_debug
but that didn't help
-
Is this your developer build ? If so there's no need to call make install.
-
okay but is there a reason i should NOT call make install? i did make install the first time, when debugging DID work fine. it only stopped after i modified a file. does calling make install break something? besides i was under the impression i was building both debug and release?
-
AFAIK, it should not.
Did you try to do a clean rebuild ?