diff options
author | Araq <rumpf_a@web.de> | 2013-03-09 20:43:56 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-03-09 20:43:56 +0100 |
commit | a64d4dc35c5b93c85a512261b78a89cdf1282e8d (patch) | |
tree | 1d8906c93a3fa4f32a0ec63fb6d42f005fb2671b /lib | |
parent | 2b4922aea0350c3a225619e7e10b74de95bfc2b7 (diff) | |
download | Nim-a64d4dc35c5b93c85a512261b78a89cdf1282e8d.tar.gz |
documented object constrs; endb works again
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/nimbase.h | 6 | ||||
-rwxr-xr-x | lib/system/debugger.nim | 11 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lib/nimbase.h b/lib/nimbase.h index 4735cbb4f..fcbf80fc3 100755 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -1,7 +1,7 @@ /* Nimrod's Runtime Library - (c) Copyright 2012 Andreas Rumpf + (c) Copyright 2013 Andreas Rumpf See the file "copying.txt", included in this distribution, for details about the copyright. @@ -440,9 +440,9 @@ struct TFrame { volatile TFrame F; \ F.procname = proc; F.filename = file; F.line = 0; F.len = 0; nimFrame(&F); -#define nimfrs(proc, file, slots) \ +#define nimfrs(proc, file, slots, length) \ volatile struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; TVarSlot s[slots];} F; \ - F.procname = proc; F.filename = file; F.line = 0; F.len = slots; nimFrame((TFrame*)&F); + F.procname = proc; F.filename = file; F.line = 0; F.len = length; nimFrame((TFrame*)&F); #define nimln(n, file) \ F.line = n; F.filename = file; diff --git a/lib/system/debugger.nim b/lib/system/debugger.nim index f234c9daf..101b3c599 100755 --- a/lib/system/debugger.nim +++ b/lib/system/debugger.nim @@ -207,9 +207,8 @@ proc fileMatches(c, bp: cstring): bool = return false var i = 0 while i < blen: - var x, y: char - x = bp[i] - y = c[i+clen-blen] + var x = bp[i] + var y = c[i+clen-blen] when FileSystemCaseInsensitive: if x >= 'A' and x <= 'Z': x = chr(ord(x) - ord('A') + ord('a')) if y >= 'A' and y <= 'Z': y = chr(ord(y) - ord('A') + ord('a')) @@ -742,7 +741,7 @@ proc checkWatchpoints = debugOut(Watchpoints[i].name) Watchpoints[i].oldValue = newHash -proc endb(line: int) {.compilerproc.} = +proc endb(line: int, file: cstring) {.compilerproc.} = # This proc is called before every Nimrod code line! # Thus, it must have as few parameters as possible to keep the # code size small! @@ -753,6 +752,7 @@ proc endb(line: int) {.compilerproc.} = #if oldState != dbOff: checkWatchpoints() framePtr.line = line # this is done here for smaller code size! + framePtr.filename = file if dbgLineHook != nil: dbgLineHook() case oldState of dbStepInto: @@ -765,7 +765,8 @@ proc endb(line: int) {.compilerproc.} = CommandPrompt() else: # breakpoints are wanted though (I guess) checkForBreakpoint() - of dbBreakpoints: # debugger is only interested in breakpoints + of dbBreakpoints: + # debugger is only interested in breakpoints checkForBreakpoint() else: nil |