From 1c7cab6c6bd956055da7f4109ff1c5adcf12c7c1 Mon Sep 17 00:00:00 2001 From: zah Date: Thu, 9 Mar 2017 09:39:32 +0200 Subject: [PATCH] Updated Debugging the compiler (markdown) --- Debugging-the-compiler.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Debugging-the-compiler.md b/Debugging-the-compiler.md index 7b0ee5a..286e80c 100644 --- a/Debugging-the-compiler.md +++ b/Debugging-the-compiler.md @@ -60,7 +60,7 @@ Obviously, the above assumes that "nimd" was also linked in "/usr/local/bin" or ### Printf debugging -"Printf debugging" is still the most appropriate way to debug many problems arising in compiler development. The typical usage of break points to debug the code is often less practical, because almost all of the code paths in the compiler will be executed hundreds of times before a particular section of the tested program is reached, and where the newly developed code must be activated. +"Printf debugging" is still the most appropriate way to debug many problems arising in compiler development. The typical usage of break points to debug the code is often less practical, because almost all of the code paths in the compiler will be executed hundreds of times before a particular section of the tested program is reached where the newly developed code must be activated. To work-around this problem, you'll typically introduce an if statement in the compiler code detecting more precisely the conditions where the tested feature is being used. One very common way to achieve this is to use the `mdbg` condition, which will be true only in contexts, processing expressions and statements from the currently compiled main module.