Minor exception bug with unexpected

Alexandre Oliva oliva@dcc.unicamp.br
Fri Mar 20 03:37:00 GMT 1998


Arvind Sankar writes:

> On Fri, Mar 20, 1998 at 03:07:32AM -0300, Alexandre Oliva wrote:
>> 
>> Not an overkill, it's useful for debugging.  If the program just
>> exit()s, you won't be able to know why it did so.  However, if it
>> abort()s, you just have to use a debugger to look at the core file and 
>> you'll know why.

> following up on this, should there be an option to the compiler to make
> it dump core on an internal compiler error, so that somebody can make
> out what went wrong?

That's not necessary, because such errors are easily reproducible.
You just have to re-run the compiler (cc1 or cc1plus) inside gdb, from
inside the source tree, it will automatically set a breakpoint on
abort() and will define a few commands that ease debugging gcc (see
egcs/gcc/.gdbinit)

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil




More information about the Gcc-bugs mailing list