File: debug.h

package info (click to toggle)
alpine 2.26%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 46,756 kB
  • sloc: ansic: 362,804; tcl: 26,297; sh: 4,910; javascript: 3,789; makefile: 1,935; perl: 159; python: 119; xml: 93; exp: 69; sed: 16; cpp: 7
file content (59 lines) | stat: -rw-r--r-- 1,439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 * $Id: debug.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
 *
 * ========================================================================
 * Copyright 2013-2022 Eduardo Chappa
 * Copyright 2006 University of Washington
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * ========================================================================
 */

#ifndef PITH_DEBUG_INCLUDED
#define PITH_DEBUG_INCLUDED


/*======================================================================
       Macros for debug printfs 
   n is debugging level:
       1 logs only highest level events and errors
       2 logs events like file writes
       3
       4 logs each command
       5
       6 
       7 logs details of command execution (7 is highest to run any production)
         allows core dumps without cleaning up terminal modes
       8
       9 logs gross details of command execution
    
  ====*/


#ifdef DEBUG

#define   dprint(x)	{ output_debug_msg x ; }

/* global debugging level */
extern int debug;

/* mandatory to implement stubs */
void	output_debug_msg(int, char *fmt, ...);
void	dump_configuration(int);
void	dump_contexts(void);



#else	/* !DEBUG */

#define   dprint(x)

#endif	/* !DEBUG */


#endif /* PITH_DEBUG_INCLUDED */