File: DI.3

package info (click to toggle)
nana 2.5-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,712 kB
  • ctags: 369
  • sloc: sh: 3,498; ansic: 1,547; makefile: 177; tcl: 48; lisp: 39
file content (53 lines) | stat: -rw-r--r-- 1,421 bytes parent folder | download | duplicates (6)
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
.TH DI 3
.SH NAME 
DI - verify assertions in C and C++ code using gdb(1)
.SH SYNOPSIS

#include <DI.h>

DI(exprn)

DIG(exprn,guard) 

DIH(exprn,handler) 

DIP(exprn,param)

DIGH(exprn,guard,handler) 

DIHP(exprn,handler,param) 

DIGHP(exprn,guard,handler,param)

DS(exprn) 

.SH DESCRIPTION

The DI(exprn) checks that the exprn is true in the same way as assert(3). 
It is however implemented by generating debugger commands from the source
code and so only works if you run the command under a debugger after 
source the command file generated by nana(1).

exprn - the expression to be checked.

guard - the expression is normally only checked if the guard is true. 

handler - a macro which generates the code that handles the error
condition.

param - a parameter which can be passed off to the handler. This can
be used for identifying the assertion failure in a space-efficent
manner, e.g. by copying it into a register before aborting.

See nana.info for details on configuring the behaviour on error
detection, etc. You also need to include the nana library by using
-lnana if you use the default setup.

In addition to the DI, DIG, etc DI.h also provides DN, DNG, etc which are 
used to check that an expression is never true. 
.SH SEE ALSO
nana-clg(1), nana(1), nana(3), I(3), L(3), DL(3), Q(3) and nana.info.

The nana.info file is the primary documentation for this library.
.SH AUTHOR
Phil Maker <pjm@gnu.org>