This is the mail archive of the gcc-bugs@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]

Re: Minor exception bug with unexpected


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



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