documented object constrs; endb works again

This commit is contained in:
Araq
2013-03-09 20:43:56 +01:00
parent 2b4922aea0
commit a64d4dc35c
11 changed files with 152 additions and 143 deletions

View File

@@ -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;

View File

@@ -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