Download   Online Shop   Red Hat Network
Home  |  Products & Services  |  Support  |  Training  |  Partners  |  Documentation   
Red Hat Documentation

Overview | HOWTOs | mini-HOWTOs | FAQs | Linux Man-Pages

Process Monitor HOW-TO for Linux: File debug.h Next Previous Contents

5. File debug.h

// From your browser save this file as text-file named as 'debug.h'.


#ifdef DEBUG
#include <stdio.h>
//#include <strings.h>
//#include <assert.h>  // assert() macro which is also used for debugging
// Debugging code 
// Use debug2_ to output result to a log file
#define debug_(NM, VL) (void) ( local_dbg(NM, VL, __FILE__, __LINE__) )
#define debug2_(NM, VL, LOG_FILE) (void) ( local_dbg(NM, VL, __FILE__, __LINE__, LOG_FILE) )
void local_dbg(char name[], char value[], char fname[], int lineno, bool logfile= false);
void local_dbg(char name[], int value, char fname[], int lineno, bool logfile= false);
void local_dbg(char name[], unsigned long value, char fname[], int lineno, bool logfile= false);
void local_dbg(char name[], float value, char fname[], int lineno, bool logfile= false);
#else
#define debug_(NM, VL) ((void) 0)
#define debug2_(NM, VL, LOG_FILE) ((void) 0)
#endif // DEBUG


Next Previous Contents

 

 
 
Search for:  on    Powered by Google
Products & Services   :   Download   :   Support   :   Training   :   Partners & Programs
© 2001 Red Hat, Inc. All rights reserved.       About Red Hat   :   Legal statement   :   Privacy statement   :   Y2K statement   :   Contact Red Hat