assertions and debuggers

Dan Bernstein brnstnd at kramden.acf.nyu.edu
Sat Sep 22 13:32:07 AEST 1990


In article <18100 at haddock.ima.isc.com> karl at haddock.ima.isc.com (Karl Heuer) writes:
> 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()?
    [ followed by an explanation (deleted) of how to answer the question ]
> It already *is* an abort().

No, it is not, on this Sun 4 at least. You should be scolded for not
paying attention to portability. ( :-) )

> If you run the program from the debugger, it will
> stop when it gets the SIGABRT.

It may not be worth using the debugger all the time, even when you're
developing the program.

---Dan



More information about the Comp.lang.c mailing list