Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: assertions and debuggers Keywords: assert,dbx Message-ID: <13921@smoke.BRL.MIL> Date: 21 Sep 90 22:48:43 GMT References: <10834@rama.UUCP> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 14 In article <10834@rama.UUCP> lvw@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.