`GDB.h' provides macros for generating user specified commands in the output of the `nana' command. They are not included by default in the `nana.h' file.
This could be used to set debugger options or to define procedures inside `gdb', e.g.
GDB(define checkstack); GDB( if 0 <= n && n <= 10); GDB( print "stack ok"); GDB( else); GDB( print "stack corrupted"); GDB( end); GDB(end);
GDBCALL(set memory_check = 1)
These macros could used for instrumenting code or setting up test harnesses, e.g.
GDB(set $siocall = 0); GDB(set $sioerr = 0); void sio_driver() { GDBCALL(set $siocall++) if(SIO_REQ & 0x010) { GDBCALL(set $sioerr++); ... } }
Go to the first, previous, next, last section, table of contents.