Cross Reference: debug.h
xref
: /
osnet-11
/
usr
/
src
/
lib
/
libast
/
sparcv9
/
include
/
ast
/
debug.h
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
1
N/A
1
N/A
/* : : generated by proto : : */
1
N/A
/***********************************************************************
1
N/A
* *
1
N/A
* This software is part of the ast package *
1
N/A
* Copyright (c) 1985-2011 AT&T Intellectual Property *
1
N/A
* and is licensed under the *
1
N/A
* Common Public License, Version 1.0 *
1
N/A
* by AT&T Intellectual Property *
1
N/A
* *
1
N/A
* A copy of the License is available at *
1
N/A
*
http://www.opensource.org/licenses/cpl1.0.txt
*
1
N/A
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
1
N/A
* *
1
N/A
* Information and Software Systems Research *
1
N/A
* AT&T Research *
1
N/A
* Florham Park NJ *
1
N/A
* *
1
N/A
* Glenn Fowler <gsf@research.att.com> *
1
N/A
* David Korn <dgk@research.att.com> *
1
N/A
* Phong Vo <kpv@research.att.com> *
1
N/A
* *
1
N/A
***********************************************************************/
1
N/A
1
N/A
/*
1
N/A
* common ast debug definitions
1
N/A
* include after the ast headers
1
N/A
*/
1
N/A
1
N/A
#
ifndef
_DEBUG_H
1
N/A
#
if
!
defined
(
__PROTO__
)
1
N/A
#
include
<
prototyped.h
>
1
N/A
#
endif
1
N/A
#
if
!
defined
(
__LINKAGE__
)
1
N/A
#
define
__LINKAGE__
/* 2004-08-11 transition */
1
N/A
#
endif
1
N/A
1
N/A
#
define
_DEBUG_H
1
N/A
1
N/A
#
include
<
ast.h
>
1
N/A
#
include
<
error.h
>
1
N/A
1
N/A
#
if
!
defined
(
DEBUG
) &&
_BLD_DEBUG
1
N/A
#
define
DEBUG
_BLD_DEBUG
1
N/A
#
endif
1
N/A
1
N/A
#
if
DEBUG
||
_BLD_DEBUG
1
N/A
1
N/A
#
define
debug
(x) x
1
N/A
#
define
message
(x)
do
if
(
error_info
.
trace
< 0) {
error
x; }
while
(0)
1
N/A
#
define
messagef
(x)
do
if
(
error_info
.
trace
< 0) {
errorf
x; }
while
(0)
1
N/A
1
N/A
#
define
DEBUG_BEGTIME
()
debug_elapsed
(
1
)
1
N/A
#
define
DEBUG_GETTIME
()
debug_elapsed
(0)
1
N/A
#
define
DEBUG_ASSERT
(p) ((p) ? 0 : (
debug_fatal
(
__FILE__
,
__LINE__
),0))
1
N/A
#
define
DEBUG_COUNT
(n) ((n) +=
1
)
1
N/A
#
define
DEBUG_TALLY
(c,n,v) ((c) ? ((n) += (v)) : (n))
1
N/A
#
define
DEBUG_INCREASE
(n) ((n) +=
1
)
1
N/A
#
define
DEBUG_DECREASE
(n) ((n) -=
1
)
1
N/A
#
define
DEBUG_DECLARE
(t,v) t v
1
N/A
#
define
DEBUG_SET
(n,v) ((n) = (v))
1
N/A
#
define
DEBUG_PRINT
(
fd
,s,v)
do
{
char
_b
[
1024
];
write
(
fd
,
_b
,
sfsprintf
(
_b
,
sizeof
(
_b
),s,v));}
while
(0)
1
N/A
#
define
DEBUG_WRITE
(
fd
,d,n)
write
((
fd
),(d),(n))
1
N/A
#
define
DEBUG_TEMP
(
temp
) (
temp
)
/* debugging stuff that should be removed */
1
N/A
#
define
DEBUG_BREAK
break
1
N/A
#
define
DEBUG_CONTINUE
continue
1
N/A
#
define
DEBUG_GOTO
(
label
)
do
{
debug_fatal
(
__FILE__
,
__LINE__
);
goto
label
; }
while
(0)
1
N/A
#
define
DEBUG_RETURN
(x)
do
{
debug_fatal
(
__FILE__
,
__LINE__
);
return
(x); }
while
(0)
1
N/A
1
N/A
#
else
1
N/A
1
N/A
#
define
debug
(x)
1
N/A
#
define
message
(x)
1
N/A
#
define
messagef
(x)
1
N/A
1
N/A
#
define
DEBUG_BEGTIME
()
1
N/A
#
define
DEBUG_GETTIME
()
1
N/A
#
define
DEBUG_ASSERT
(p)
1
N/A
#
define
DEBUG_COUNT
(n)
1
N/A
#
define
DEBUG_TALLY
(c,n,v)
1
N/A
#
define
DEBUG_INCREASE
(n)
1
N/A
#
define
DEBUG_DECREASE
(n)
1
N/A
#
define
DEBUG_DECLARE
(t,v)
1
N/A
#
define
DEBUG_SET
(n,v)
1
N/A
#
define
DEBUG_PRINT
(
fd
,s,v)
1
N/A
#
define
DEBUG_WRITE
(
fd
,d,n)
1
N/A
#
define
DEBUG_TEMP
(x)
1
N/A
#
define
DEBUG_BREAK
break
1
N/A
#
define
DEBUG_CONTINUE
continue
1
N/A
#
define
DEBUG_GOTO
(
label
)
goto
label
1
N/A
#
define
DEBUG_RETURN
(x)
return
(x)
1
N/A
1
N/A
#
endif
1
N/A
1
N/A
#
ifndef
BREAK
1
N/A
#
define
BREAK
DEBUG_BREAK
1
N/A
#
endif
1
N/A
#
ifndef
CONTINUE
1
N/A
#
define
CONTINUE
DEBUG_CONTINUE
1
N/A
#
endif
1
N/A
#
ifndef
GOTO
1
N/A
#
define
GOTO
(
label
)
DEBUG_GOTO
(
label
)
1
N/A
#
endif
1
N/A
#
ifndef
RETURN
1
N/A
#
define
RETURN
(x)
DEBUG_RETURN
(x)
1
N/A
#
endif
1
N/A
1
N/A
#
if
_BLD_ast
&&
defined
(
__EXPORT__
)
1
N/A
#
undef
__MANGLE__
1
N/A
#
define
__MANGLE__
__LINKAGE__
__EXPORT__
1
N/A
#
endif
1
N/A
1
N/A
extern
__MANGLE__
double
debug_elapsed
__PROTO__
((
int
));
1
N/A
extern
__MANGLE__
void
debug_fatal
__PROTO__
((
const
char
*,
int
));
1
N/A
extern
__MANGLE__
void
systrace
__PROTO__
((
const
char
*));
1
N/A
1
N/A
#
undef
__MANGLE__
1
N/A
#
define
__MANGLE__
__LINKAGE__
1
N/A
1
N/A
#
endif