summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-03-16 17:07:47 +0100
committerAraq <rumpf_a@web.de>2013-03-16 17:07:47 +0100
commitb63f322a466351bc57f8a4593009f0520c348527 (patch)
treeac80f1cd1a7c8b7b058ef51673dd65593a7dd827 /lib/system.nim
parent78b27ed7fa121d2cb032fa1b74ae434034bf8e23 (diff)
downloadNim-b63f322a466351bc57f8a4593009f0520c348527.tar.gz
debugger improvements
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-xlib/system.nim19
1 files changed, 8 insertions, 11 deletions
diff --git a/lib/system.nim b/lib/system.nim
index db78d2740..4aa7ecad5 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -1650,10 +1650,6 @@ const nimrodStackTrace = compileOption("stacktrace")
 # of the code
 
 var
-  dbgLineHook*: proc () {.nimcall.}
-    ## set this variable to provide a procedure that should be called before
-    ## each executed instruction. This should only be used by debuggers!
-    ## Only code compiled with the ``debugger:on`` switch calls this hook.
   globalRaiseHook*: proc (e: ref E_Base): bool {.nimcall.}
     ## with this hook you can influence exception handling on a global level.
     ## If not nil, every 'raise' statement ends up calling this hook. Ordinary
@@ -1691,13 +1687,14 @@ var
     ## continues and the program is terminated.
 
 type
-  PFrame = ptr TFrame
-  TFrame {.importc, nodecl, final.} = object
-    prev: PFrame
-    procname: CString
-    line: int # current line number
-    filename: CString
-    len: int  # length of slots (when not debugging always zero)
+  PFrame* = ptr TFrame  ## represents a runtime frame of the call stack;
+                        ## part of the debugger API.
+  TFrame* {.importc, nodecl, final.} = object ## the frame itself
+    prev*: PFrame       ## previous frame; used for chaining the call stack
+    procname*: cstring  ## name of the proc that is currently executing
+    line*: int          ## line number of the proc that is currently executing
+    filename*: cstring  ## filename of the proc that is currently executing
+    len*: int           ## length of the inspectable slots
 
 when not defined(JS):
   {.push stack_trace:off, profiler:off.}