assertions and debuggers

Karl Heuer karl at haddock.ima.isc.com
Sat Sep 22 09:59:10 AEST 1990


In article <14186:Sep2105:48:2290 at kramden.acf.nyu.edu> brnstnd at kramden.acf.nyu.edu (Dan Bernstein) writes:
>In article <10835 at rama.UUCP> lvw at rama.UUCP (Lyndon VanWagner) writes:
>> 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.
>  [ and in UNIX? ]
>
>Why not just change the exit() to an abort()?

It already *is* an abort().  If you run the program from the debugger, it will
stop when it gets the SIGABRT.  Do you really need more than that?  (Some
versions of abort() also close the stdio streams first; I have mixed feelings
about this since it makes it harder to do certain kinds of debugging.)

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.lang.c mailing list