implemented 'injectStmt'; more debug support
This commit is contained in:
parent
01661daf76
commit
132b6b3efe
12 changed files with 60 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue