Go to the first, previous, next, last section, table of contents.
Nana has the following known features:
- Nana macros should be on lines by themselves. If you mix code
and nana macros you will get errors, e.g:
main(){
int x;
x = 5; x--; DI(x == 4);
}
This doesn't work since breakpoints are set at line boundaries rather
than statement ones. Of course anyone who writes code like this deserves
whatever happens to them.
- Optimisation can remove variables so that debugger based
assertions (`DI.h') do not work correctly. As usual the
interaction between the debugger and the compiler is rather
complicated. This may not be a problem if the appropriate compile-time
flags are selected, e.g. `-O0 and -O1' work on most platforms.
- The `Q.h' macros depend on the statement value extension to
GNU CC so if you wish to use them you must use GCC. This can be fixed
for C++ in a possibly useful manner, I can't see any solution for C.
- The logging macros depend on the Var Args extension provided by the
GNU C Preprocessor.(3) We could (probably will) implement a fix for this
based on the tricks in the C FAQ. Unfortunately these tricks are not pretty.
For now interested users could simply replace their CPP with the GNU CPP
if they wished to stay with non-standard compilers.
- The `Q.h' macros do not work in the debugger since `gdb'
does support the statement expression extension.
- Multiline expressions do not work as expected in the debugger since
you need to use a blackslash as an escape at the end of the line.
For example:
DI(x +
10 > 30);
A few backslashes may solve this particular problem.
- Problems with the `configure' script.
The `configure' script automatically detects the target operating
system and architecture and then generates `nana-config.h'. If the
options selected in `nana-config.h' are incorrect they can be
edited by hand and installed in the usual include directory. The easiest
method is simply to delete all macros in `nana-config.h' since the
system defaults to more portable (and less efficient)
implementations. If you wish to do this from the configure script you
can try giving a unsupported machine type, e.g.
% ./configure pdp11-dec-ultrix
Go to the first, previous, next, last section, table of contents.