summary refs log tree commit diff stats
path: root/doc/nimrodc.txt
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-12-16 22:26:17 +0100
committerAraq <rumpf_a@web.de>2013-12-16 22:26:17 +0100
commit132b6b3efee8d1be7f94545ed5fefaf64de741dc (patch)
treecc2a24dd33eadc48a621d12e89294ecd451710c9 /doc/nimrodc.txt
parent01661daf76daa713d25d06d202f83c842a6f1fe3 (diff)
downloadNim-132b6b3efee8d1be7f94545ed5fefaf64de741dc.tar.gz
implemented 'injectStmt'; more debug support
Diffstat (limited to 'doc/nimrodc.txt')
-rw-r--r--doc/nimrodc.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt
index d494a0922..f5fbf3ebb 100644
--- a/doc/nimrodc.txt
+++ b/doc/nimrodc.txt
@@ -468,6 +468,19 @@ proc is declared in the generated code:
 
   proc myinterrupt() {.codegenDecl: "__interrupt $# $#$#".} =
     echo "realistic interrupt handler"
+
+
+InjectStmt pragma
+-----------------
+
+The `injectStmt`:idx: pragma can be used to inject a statement before every
+other statement in the current module. It is only supposed to be used for
+debugging:
+
+.. code-block:: nimrod
+  {.injectStmt: gcInvariants().}
+  
+  # ... complex code here that produces crashes ...
 

 

 LineDir option