Ver código fonte

Added some tweaks for gdb mode.

Brucey 3 anos atrás
pai
commit
dedc81e577
2 arquivos alterados com 6 adições e 2 exclusões
  1. 2 2
      bmk_make.bmx
  2. 4 0
      bmk_util.bmx

+ 2 - 2
bmk_make.bmx

@@ -359,7 +359,7 @@ Type TBuildManager Extends TCallback
 	
 		Local cc_opts:String
 		source.AddIncludePath(" -I" + CQuote(ModulePath("")))
-		If opt_release Then
+		If opt_release And Not opt_gdbdebug Then
 			cc_opts :+ " -DNDEBUG"
 		End If
 		If processor.BCCVersion() <> "BlitzMax" Then
@@ -1291,7 +1291,7 @@ Type TBuildManager Extends TCallback
 			Local cc_opts:String
 			source.AddIncludePath(" -I" + CQuote(path))
 			source.AddIncludePath(" -I" + CQuote(ModulePath("")))
-			If opt_release Then
+			If opt_release And Not opt_gdbdebug Then
 				cc_opts :+ " -DNDEBUG"
 			End If
 			If opt_threaded Then

+ 4 - 0
bmk_util.bmx

@@ -226,6 +226,10 @@ Function LinkApp( path$,lnk_files:TList,makelib:Int,opts$ )
 	
 		sb.Append(" -o ").Append(CQuote( path ))
 	
+		If opt_debug Or opt_gdbdebug Then
+			sb.Append(" -g")
+		End If
+
 		If processor.BCCVersion() = "BlitzMax" Then
 			sb.Append(" ").Append(CQuote("-L" +CQuote( BlitzMaxPath()+"/lib" ) ))
 		End If