Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!yale!husc6!spdcc!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: assertions and debuggers Message-ID: <18100@haddock.ima.isc.com> Date: 21 Sep 90 23:59:10 GMT References: <10835@rama.UUCP> <14186:Sep2105:48:2290@kramden.acf.nyu.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Distribution: usa Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 15 In article <14186:Sep2105:48:2290@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes: >In article <10835@rama.UUCP> lvw@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@kelp.ima.isc.com or ima!kelp!karl), The Walking Lint