Steven Bosscher <[EMAIL PROTECTED]> wrote: system.h:#define abort() fancy_abort (__FILE__, __LINE__, __FUNCTION__)
I agree that this is the best technical solution, even if cross-jumping were not an issue. Also: On Monday 14 March 2005 04:00, Richard Stallman wrote: > > But you recommend a different solution to this problem: changing all > > the abort calls so that (1) they can't be cross-jumped and (2) they > > use even more space. If everyone follows your recommendation, not > > only will no abort calls ever be cross jumped, but the net result will > > be to make the compiled program even bigger than it would have been. Debugging information uses massive space, therefore almost no users of free software have debugging information in the executables that they run daily. Distributions would have to triple the number of CDs shipped. Most users don't know how to run a debugger. This means that there is no debug information available until a developer tries to duplicate the problem report. With or without cross-jumping, when the developer gets a report from a user that "the program died with an abort", he or she has to debug from scratch, only to find out in many cases that it's a known bug, already fixed in CVS for the next release, information that would have been revealed immediately by the output of fancy_abort. With a pointer to the exact function, file, and line where the crash occurred, in many cases the user can use a search engine to find an already-existing discussion of the bug, and possibly even a workaround. To me, this means that fancy_abort is clearly preferable to abort, and the win is so large that I would urge all GNU projects to adopt it immediately. As Steven points out, the cost to the developer can be as little as the inclusion of one line in a widely-included header. It is true that the strings for __FILE__ and __FUNCTION__ require space, but this is negligible, especially due to sharing. All that said, however, Steven, you are being unnecessarily rude and dismissive: > You don't have to change any abort calls in the source code, you just > replace the definition of abort. You are greatly exaggerating the > increase in space my recommendation would cause. And you complain > that no abort calls can ever be crossjumped, but you are saying that > should not ever happen anyway, so your point is moot. > > Your silly overstatement of the burden on the user to change the > program, and the point that crossjumping is a useless optimization, > are the only things that makes no sense. Please watch the tone; we can disagree without being insulting. Please especially don't insult the man who started GCC in the first place, even if you're sure he is wrong.