summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-02-26 16:12:33 +0100
committerAraq <rumpf_a@web.de>2015-02-27 16:44:54 +0100
commit169974cfe6dd40387b89649164692cbdfd28a2bf (patch)
treed1de388e2b771a8c4d52d5f1195165490f3e822b /compiler
parentf87d663ab71f1d9513ccc7b25c453ee6b09b83aa (diff)
downloadNim-169974cfe6dd40387b89649164692cbdfd28a2bf.tar.gz
improved --debugger switch; updated release plan
Diffstat (limited to 'compiler')
-rw-r--r--compiler/commands.nim20
1 files changed, 15 insertions, 5 deletions
diff --git a/compiler/commands.nim b/compiler/commands.nim
index c52515c76..6e594375f 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -326,7 +326,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
   of "link": 
     expectArg(switch, arg, pass, info)
     if pass in {passCmd2, passPP}: addFileToLink(arg)
-  of "debuginfo": 
+  of "debuginfo":
     expectNoArg(switch, arg, pass, info)
     incl(gGlobalOptions, optCDebug)
   of "embedsrc":
@@ -374,10 +374,20 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
   of "threadanalysis": processOnOffSwitchG({optThreadAnalysis}, arg, pass, info)
   of "stacktrace": processOnOffSwitch({optStackTrace}, arg, pass, info)
   of "linetrace": processOnOffSwitch({optLineTrace}, arg, pass, info)
-  of "debugger": 
-    processOnOffSwitch({optEndb}, arg, pass, info)
-    if optEndb in gOptions: defineSymbol("endb")
-    else: undefSymbol("endb")
+  of "debugger":
+    case arg.normalize
+    of "on", "endb":
+      gOptions.incl optEndb
+      defineSymbol("endb")
+    of "off":
+      gOptions.excl optEndb
+      undefSymbol("endb")
+    of "native":
+      incl(gGlobalOptions, optCDebug)
+      gOptions = gOptions + {optLineDir} - {optEndb}
+      undefSymbol("endb")
+    else:
+      localError(info, "expected endb|gdb but found " & arg)
   of "profiler": 
     processOnOffSwitch({optProfiler}, arg, pass, info)
     if optProfiler in gOptions: defineSymbol("profiler")