cmake: use -ggdb instead of -g

Enable all gdb extensions for debug
This commit is contained in:
Gregory Hainaut 2015-08-07 09:39:51 +02:00
parent b3919fde95
commit 99d81868fc
1 changed files with 6 additions and 3 deletions

View File

@ -242,18 +242,21 @@ if (USE_CLANG)
# -Wno-deprecated-register: glib issue...
set(DEFAULT_WARNINGS "${DEFAULT_WARNINGS} -Wno-deprecated-register")
set(COMMON_FLAG "${COMMON_FLAG} -no-integrated-as")
set(DBG "-g")
else()
set(DBG "-ggdb")
endif()
if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(DEBUG_FLAG "-g")
set(DEBUG_FLAG "${DBG}")
elseif(CMAKE_BUILD_TYPE MATCHES "Devel")
set(DEBUG_FLAG "-g -DNDEBUG")
set(DEBUG_FLAG "${DBG} -DNDEBUG")
elseif(CMAKE_BUILD_TYPE MATCHES "Release")
set(DEBUG_FLAG "-DNDEBUG")
endif()
if (USE_ASAN)
set(ASAN_FLAG "-fsanitize=address -fno-omit-frame-pointer -g -DASAN_WORKAROUND")
set(ASAN_FLAG "-fsanitize=address -fno-omit-frame-pointer ${DBG} -DASAN_WORKAROUND")
if(${PCSX2_TARGET_ARCHITECTURES} MATCHES "i386")
set(ASAN_FLAG "${ASAN_FLAG} -mpreferred-stack-boundary=4 -mincoming-stack-boundary=2")
endif()