summary refs log tree commit diff stats
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
parentf87d663ab71f1d9513ccc7b25c453ee6b09b83aa (diff)
downloadNim-169974cfe6dd40387b89649164692cbdfd28a2bf.tar.gz
improved --debugger switch; updated release plan
-rw-r--r--compiler/commands.nim20
-rw-r--r--doc/advopt.txt3
-rw-r--r--doc/basicopt.txt2
-rw-r--r--todo.txt5
4 files changed, 19 insertions, 11 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")
diff --git a/doc/advopt.txt b/doc/advopt.txt
index 7b3695532..d4b1b7e57 100644
--- a/doc/advopt.txt
+++ b/doc/advopt.txt
@@ -48,7 +48,6 @@ Advanced options:
   --os:SYMBOL               set the target operating system (cross-compilation)
   --cpu:SYMBOL              set the target processor (cross-compilation)
   --debuginfo               enables debug information
-  --debugger:on|off         turn Embedded Nim Debugger on|off
   -t, --passC:OPTION        pass an option to the C compiler
   -l, --passL:OPTION        pass an option to the linker
   --cincludes:DIR           modify the C compiler header search path
@@ -88,7 +87,5 @@ Advanced options:
   --parallelBuild:0|1|...   perform a parallel build
                             value = number of processors (0 for auto-detect)
   --verbosity:0|1|2|3       set Nim's verbosity level (1 is default)
-  --cs:none|partial         set case sensitivity level (default: none);
-                            do not use! this setting affects the whole language
   --experimental            enable experimental language features
   -v, --version             show detailed version information
diff --git a/doc/basicopt.txt b/doc/basicopt.txt
index 27b10badc..7d08f1159 100644
--- a/doc/basicopt.txt
+++ b/doc/basicopt.txt
@@ -6,7 +6,6 @@ Command:
   //compile, c                compile project with default code generator (C)
   //doc                       generate the documentation for inputfile
   //doc2                      generate the documentation for the whole project
-  //i                         start Nim in interactive mode (limited)
 
 Arguments:
   arguments are passed to the program being run (if --run option is selected)
@@ -30,6 +29,7 @@ Options:
   --infChecks:on|off        turn Inf checks on|off
   --deadCodeElim:on|off     whole program dead code elimination on|off
   --opt:none|speed|size     optimize not at all or for speed|size
+  --debugger:native|endb    use native debugger (gdb) | ENDB (experimental)
   --app:console|gui|lib|staticlib
                             generate a console app|GUI app|DLL|static library
   -r, --run                 run the compiled program with given arguments
diff --git a/todo.txt b/todo.txt
index 3fed10aeb..1d180f737 100644
--- a/todo.txt
+++ b/todo.txt
@@ -5,6 +5,8 @@ version 0.10.4
 - make 'nil' work for 'add' and 'len'
 - get rid of 'mget'; aka priority of 'var' needs to be 'var{lvalue}'
 - 'result' shadowing warning
+- disallow negative indexing
+- improve the parser; deal with  echo $foo  gotcha
 
 
 version 1.0
@@ -75,8 +77,7 @@ version 0.9.X
 =============
 
 - macros as type pragmas
-- lazy overloading resolution:
-  * special case ``tyStmt``
+- document how lazy overloading resolution works
 - document NimMain and check whether it works for threading
 
 GC