Using Macros to Print Debug Messages in C [moved]

moved to malloc.CO

If you enjoyed this post, make sure you subscribe to my RSS feed!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

No related posts.

Tags: , ,

Saturday, November 22nd, 2008 Programming

5 Comments to Using Macros to Print Debug Messages in C [moved]

  • sami says:

    مشكور على المعلومات القيمة يا ابو البلد

  • Amir Watad says:

    أهلاً وسهلاً. تعال كل يوم :)

  • wdef says:

    Handy macro – just what I was looking for.
    Thanks

  • Sonixant says:

    Instead of defining DEBUG from the code you can define it at compile time directly from gcc, e.g.:
    $ gcc -DDEBUG …

    you can even create a target rule for debugging in your makefile, just add the rule:
    debug:
    $(MAKE) DBGFLAGS=”-DDEBUG”

    this way a simple:
    $ make debug

    makes the trick!

  • Amir Watad says:

    Thank you @Sonixant :)

  • Leave a Reply

    my email
    my photo
    Hi,
    My name is Amir Watad. I have a BSc. in biomedical engineering from The Biomedical Engineering school , Technion , Israel, and a BSc. in electrical engineering from The Electrical Engineering school , Technion , Israel.
    I'm a Verification Engineer in Mellanox Technologies Ltd.
    I love Linux, the Command Line and the OpenSource Community.
    I used to write Poems (Arabic) when I was able to find time for this.
    November 2008
    S M T W T F S
    « Oct   Dec »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
    SEO Powered by Platinum SEO from Techblissonline

    Twitter links powered by Tweet This v1.7.4, a WordPress plugin for Twitter.