debugging: vars "not accessible" ?
-
i am getting this a lot :
see thatskuP
? i should definitely be able to see inside it. why not? i am in debugging, and the build config is set to "debug" mode too... so what gives? -
Compiler, debugger? What's the compile line you used?
It's possible to have partial/incomplete debug information. I've had a similar problem debugging into Qt, where the compiler did reorder the code (in debug mode mind you) due to partially optimized debug build being used (a flag enabled it, which after being removed fixed it for me). -
what do you mean "what is the compile line" ? if this helps, here:
i don't have any optimize flags set in the pro file
-
@davecotter said in debugging: vars "not accessible" ?:
what do you mean "what is the compile line" ?
The line that is used to compile the code in question, that is, the effective call to the compiler (you can peek at it in the "Compile output" pane in Creator, which it seems is what you're using). For me it looks like this:
g++ -c -pipe -fvisibility=hidden -g -std=gnu++11 -frtti -D_REENTRANT -Wall -Wextra -fPIC -DRTS_SHARED -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I. -I../../lib -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtPrintSupport -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtSql -I/usr/include/x86_64-linux-gnu/qt5/QtNetwork -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I.moc -I.ui -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o .obj/MySourceFile.o MySourceFile.cpp
-
on windows, in a file that shows NOTHING in the vars panel, the compile line is this (broken onto separate lines for easier reading, and i omitted a lot of the "include" lines)
cl -c -FI..\..\xplat\proj\win\src\stdafx.h -Yu..\..\xplat\proj\win\src\stdafx.h -Fp"kJams 2 Debug_pch.pch" -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -MP -Zi -MDd -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 /wd4100 -EHsc /Fd"kJams 2 Debug.vc.pdb" -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -DkDEBUG -DKJAMS_PRO -DKJAMS_2 -D_QT_=1 -D_YAAF_=0 -DQT_DEPRECATED_WARNINGS -DCOMPILING_ON_10_4_OR_BETTER=1 -DCOMPILING_ON_10_5_OR_BETTER=1 -DCOMPILING_ON_10_6_OR_BETTER=1 -DCOMPILING_ON_10_7_OR_BETTER=1 -DCOMPILING_ON_10_8_OR_BETTER=1 -DCOMPILING_ON_10_9_OR_BETTER=1 -D_KJAMS_ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_COLUMN_METADATA -DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DOPT_MACOS=0 -DOPT_WINOS=1 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DNO_ERRNO_H -DID3LIB_LINKOPTION=1 -D__LP64__=1 -D__LLP64__=1 -DkDEBUG -D__WIN32__ -D_WINDOWS -DWIN32 -D_WIN32 -DTARGET_RT_LITTLE_ENDIAN=1 -DTARGET_RT_BIG_ENDIAN=0 -DPRAGMA_STRUCT_PACKPUSH=1 -D_DEBUG -DBOOST_USE_WINDOWS_H -DBOOST_THREAD_USE_LIB -DHAVE_CONFIG_H -DQT_MULTIMEDIAWIDGETS_LIB -DQT_WIDGETS_LIB -DQT_MULTIMEDIA_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I..\..\kJams -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtMultimediaWidgets -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtWidgets -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtMultimedia -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtGui -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtANGLE -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtSql -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtNetwork -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\include\QtCore -I. -I/include -IC:\Users\davec\Developer\Qt\5.15.1\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\davec\AppData\Local\Temp\CBrowser_Track.obj.9368.7328.jom
-
Well, I don't see anything out of the ordinary. I'd suggest trying to add
/Od
in any case (even though it's the default, supposedly). If that doesn't help, perhaps try dropping the precompiled header flags. -
differing versions of gdb have caused this for me, sometimes i'll be locked out of an entire set of libraries because qtcreator just doesn't 'play' with some versions of gdb from what I have found, because when people change stuff they forget that other programs just might depend on the way that data is displayed. If qtcreator gets data in a format it isn't expecting and therefore cannot properly format, or asks gdb for something in a way that it no longer supports, it will fail back to <not accessible> this problem has existed for quite some time (i came back about 6-7 years later to find this has not improved much, though it is a little better than it used to be)