| Q D E V D E B U G I O ( )
| | | | | SOURCE: qdev_macros.txt 1.16 (12/09/2014) English
PORTA - PUBLIC
----------------------------------------------------------------------------
NAME
QDEVDEBUGIO() - Debug facility extension(inliner) macro.
SYNOPSIS
QDEVDEBUGIO(va...);
QDEVDEBUGIO([ULONG]);
FUNCTION
This macro extends the 'QDEVDEBUG[x]()' debug family in
that it adds quick function location info(BFD-free) and
relevance switching and many more useful features that
help in debugging.
INPUTS
va - Optional function or program related control flags.
See the 'qdev_debug.txt' file for more details.
RETURNS
No output.
BASES
None.
NOTES
This macro should always be placed at the bottom of the
function, prefereably after the 'return' statement.
To enable function entry/exit information specify these
'-fno-inline-functions -finstrument-functions' flags at
the compilation time. Especially the last option is of
great priority when you need other features to work!
If you want to disable entry/exit info per particular
function then add '__nifunc' before the declaration.
SEE ALSO
QDEVDEBUG()
EXAMPLE
#include <qdev.h>
/*
* Entry/exit info will be printed along with enclosed
* debug output.
*/
LONG myfunc(LONG x)
{
QDEVDEBUG(QDEVDBFARGS "(x = %ld)\n", x);
return (x & 3);
QDEVDEBUGIO();
}
/*
* Entry/exit info will not be printed, but 'QDEVDEBUG'
* will be still visible.
*/
__nifunc LONG myfunc2(LONG x)
{
QDEVDEBUG(QDEVDBFARGS "(x = %ld)\n", x);
return (x & 3);
QDEVDEBUGIO();
}
BUGS
Bugs? what bugs ;-) ?
----------------------------------------------------------------------------
| |
| |