assertions and debuggers
Doug Gwyn
gwyn at smoke.BRL.MIL
Sat Sep 22 08:48:43 AEST 1990
In article <10834 at rama.UUCP> lvw at rama.UUCP (Lyndon VanWagner) writes:
>We have recently started using assertions in our C code.
>On the VAX, we have been able to redefine the assert macro to place
>us into the VMS debugger at the point of error, rather than just
>exiting the program.
>My question is this. Is it possible to do a similiar thing to Unix C
>and dbx?
In general, you would have to run the process from within dbx, due
to the hierarchical manner in which UNIX processes are interrelated.
Given that, it is easy enough to have the assert() macro invoke a
run-time function in which you can plant a breakpoint before starting
the process. In fact, my public-domain implementation of assert()
would be suitable for that.
More information about the Comp.unix.questions
mailing list