Mail Archives: djgpp/1999/01/17/05:27:28
On 16 Jan 1999, Cephaler wrote:
> After deleting about an hour's worth of code it
> stopped saying Abort!. I went on re-implementing the features that I
> deleted and it didn't show up again... What happened?
What probably happened was that you had a bug that triggered the
"Abort!" message, and you solved that bug when you rewrote the code.
(It is often said that the best way to write good code is to write it
once, then throw it away and rewrite from scratch. ;-)
"Abort!" in DJGPP v2.01 is usually printed by the library function
`abort'. If your code didn't call `abort' directly, it could have
been called by some library function. For example, if you pass a NULL
pointer to a function that expects a file name, some low-level library
functions will call `abort'. Bugs in C++ exceptions support could
also cause this.
If this problem ever happens again, put a breakpoint inside `abort',
and when it is hit, print the function call stack. This way, you will
see what part of your code triggered the abort.
- Raw text -