This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merging calls to `abort'


    Most people don't do debugging.  For some reason you appear to think
    that every free software user is also a free software debuggers.

After some 20 years of developing popular free software, I have
somewhat of an idea what users are likely to do.  I don't use
fancy_abort functions because I've found, from experience, that the
line number alone is not very useful.  It is the first necessary piece
of information, but very rarely will anyone track down the bug from
that alone.

If the user can provide a test case to reproduce the bug, then the
maintainers can debug the problem without further help from the user.
Back when handling GCC bug reports was my responsibility, the first
thing I did was run the test case under GDB and examine the data.  I
found this to be the most efficient way to proceed.  To stare at the
code first was not time-effective.

If the user can't provide a test case, the only one who can debug the
problem is the user, on the user's machine.  Either the user does it
(perhaps under the guidance of others) or it doesn't get done.  This
needs to be done with the debugger.

Therefore, it is very useful for the debugger to show the correct line
number.

    With your suggestion, "those who want to use a fancy_abort" are the
    ones who pay.

With all due respect, I don't think they will pay anything.  Changing
GCC not to cross-jump abort calls will have no effect on programs that
use fancy_abort.

This change will make GCC handle one fairly common case better, it
will not handle any case worse, and it is easy to do.  That is good
reason to make the change.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]