C PROGRAMMING ON CUED HP's
** CALLING DEPENDENCIES
To show which routines call which, use cflow. This produces an
indented output which also gives an idea of nesting.
** CROSS REFERENCES
xcrefs tells you where variables and routines are mentioned.
It's especially useful with multi-file sources
** DEBUGGING
I only use adb to see why a core dump happened. If `myprog' causes
a core dump then
adb myprog
$c
will show you what routine's return addresses were on the stack when
the crash happened, and what hex arguments they were called with. Quit
using
$q
cdb is a symbolic source-level debugger under which you can run a
program in trace mode allowing you to use breakpoints, query values,
etc. To use this you will have to first compile your program with
the -g flag.
** PRETTY PRINTING
To standardise the indentation of your program, send it through cb,
a C beautifier;
cb ugly.c > lovely.c
---------------------------------------------------------------------------