import gdb-19990422 snapshot
[deliverable/binutils-gdb.git] / gdb / debugify.h
CommitLineData
c906108c
SS
1
2/* Debug macros for development.
3 Copyright 1997
4 Free Software Foundation, Inc.
5
6This file is part of GDB.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
22#ifndef _DEBUGIFY_H_
23#define _DEBUGIFY_H_
24
25#include "ansidecl.h"
26
27#ifdef ANSI_PROTOTYPES
28#include <stdarg.h>
29#else
30#include <varargs.h>
31#endif
32
33#ifdef DEBUGIFY
34#include <assert.h>
35#ifdef TO_SCREEN
36#ifdef _Win32
37#define DBG(x) OutputDebugString x
38#else
39#define DBG(x) printf x
40#endif
41#elif TO_GDB
42#define DBG(x) printf_unfiltered x
43#elif TO_POPUP
44#ifdef _Win32
45#define DBG(x) MessageBox x
46#else
47#define DBG(x) printf x
48#endif
49#else /* default: TO_FILE "gdb.log" */
50#define DBG(x) printf_dbg x
51#endif
52
53#define ASSERT(x) assert(x)
54
55#else /* DEBUGIFY */
56#define DBG(x)
57#define ASSERT(x)
58#endif
59
60#ifdef __cplusplus
61extern "C"
62{
63#endif
64
65#ifdef REDIRECT
66#define printf_unfiltered printf_dbg
67#define fputs_unfiltered fputs_dbg
68 extern void fputs_dbg PARAMS ((const char *fmt, FILE * fakestream));
69#endif /* REDIRECT */
70
71 extern void puts_dbg PARAMS ((const char *fmt));
72#ifdef ANSI_PROTOTYPES
73 extern void printf_dbg PARAMS ((const char *fmt,...));
74#else
75 extern void printf_dbg PARAMS ((va_alist va_dcl));
76#endif
77
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* _DEBUGIFY_H_ */
This page took 0.025195 seconds and 4 git commands to generate.