在qtcreator中运行debug,发现出现以下错误:
This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.
Section .debug_info: Not found.
Section .debug_abbrev: Not found.
Section .debug_line: Not found.
Section .debug_str: Not found.
Section .debug_loc: Not found.
Section .debug_range: Not found.
Section .gdb_index: Not found.
Section .note.gnu.build-id: Found.
Section .gnu.hash: Found.
Section .gnu_debuglink: Not found.
经提醒,发现是因为cmakelists设置的是release模式
#set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Debug)
随便吐槽下,clion的调试错误提示居然是
-var-create: unable to create variable object
害我在找段错误的问题