summary refs log tree commit diff stats
path: root/lib/system
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-12-21 10:03:33 +0100
committerAraq <rumpf_a@web.de>2017-12-21 10:03:33 +0100
commitee67a67ac450968fc3d753005fe7362ac0414a10 (patch)
tree329b948726df61622d3785ac0da3e760fde954d5 /lib/system
parent2775cda6e1eaa9e64ccf1f5cd48e2447e059f2b9 (diff)
downloadNim-ee67a67ac450968fc3d753005fe7362ac0414a10.tar.gz
first steps in adding template/macro calls to stack traces
Diffstat (limited to 'lib/system')
-rw-r--r--lib/system/excpt.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim
index 70c18ae21..8e42ea468 100644
--- a/lib/system/excpt.nim
+++ b/lib/system/excpt.nim
@@ -70,6 +70,18 @@ proc getFrame*(): PFrame {.compilerRtl, inl.} = framePtr
 proc popFrame {.compilerRtl, inl.} =
   framePtr = framePtr.prev
 
+when false:
+  proc popFrameOfAddr(s: PFrame) {.compilerRtl.} =
+    var it = framePtr
+    if it == s:
+      framePtr = framePtr.prev
+    else:
+      while it != nil:
+        if it == s:
+          framePtr = it.prev
+          break
+        it = it.prev
+
 proc setFrame*(s: PFrame) {.compilerRtl, inl.} =
   framePtr = s