diff options
Diffstat (limited to 'doc/nimrodc.txt')
-rw-r--r-- | doc/nimrodc.txt | 13 |
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 |