From: Chris Lattner Date: Fri, 8 Nov 2002 06:50:02 +0000 (+0000) Subject: Add some notes about DEBUG flag X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a4e7c4ea68ada98149d732ed62241e5a6099c3d5;p=oota-llvm.git Add some notes about DEBUG flag git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4624 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index d07fc4cd3e1..26d4550087d 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -349,8 +349,15 @@ Then you can run your pass like this:

Using the DEBUG() macro instead of a home brewed solution allows you to now have to create "yet another" command line option for the debug output for -your pass. Note that DEBUG() macros are disabled for optimized -builds, so they do not cause a performance impact at all.

+your pass. Note that DEBUG() macros are disabled for optimized builds, +so they do not cause a performance impact at all (for the same reason, they +should also not contain side-effects!).

+ +One additional nice thing about the DEBUG() macro is that you can +enable or disable it directly in gdb. Just use "set DebugFlag=0" or +"set DebugFlag=1" from the gdb if the program is running. If the +program hasn't been started yet, you can always just run it with +-debug.

@@ -1769,6 +1776,6 @@ pointer to the parent Function. Chris Lattner -Last modified: Sun Oct 20 21:37:06 CDT 2002 +Last modified: Fri Nov 8 00:48:37 CST 2002