C debugging

utzoo!decvax!ucbvax!unix-wizards utzoo!decvax!ucbvax!unix-wizards
Tue Sep 15 19:59:18 AEST 1981


>From day at RAND-UNIX Tue Sep 15 19:51:32 1981
All C compilers should offer an option
to generate a call to the routine of your
choice on entrance to every subroutine,
and a similar option for the return from each
subroutine.

This would aid in tracking down memory
heap corruptions, and would make it easier to
get the debugger of your choice to skip to the
next entrance to or exit from a subroutine.

When you invoke the VAX C compiler with -p for
profiling it generates an assembly-language call
to a profiling subroutine for which I substituted
my own heap-checker, and that enabled me to zero in
on a heap-violation which was caused by an array-
out-of-bounds condition.

--dave



More information about the Comp.unix.wizards mailing list