Re: RFC: next/finish/etc -vs- exceptions

Joel Brobecker
2009-06-11T14:45:27Z

> It would be nice if we had a flag day and simply converted everything
> to breakpoint_ops. That's usually the best way to ensure that new
> code is written the "right" way (gcc has also had some bad experiences
> with these incomplete transitions).

I tried to convert a few of them a few months back. The issue is
that it's not always trivial, and sometimes the breakpoint_ops model
doesn't fit well for the functionality that you're trying to provide.
That's why I was asking whether you had a look at it, because I am
not sure that it will work. But if it does, it really simplifies
greatly the patch, or at least greatly reduces the number of places
where you touch the code.

> I was under the impression that Ada used longjmp to implement
> exceptions, and so the existing longjmp support should work. (Modulo
> the odd bug or two -- I'm not sure if Pedro's fix for the glibc
> pointer mangling went in or not.)

Actually, we have two possible mechanisms, but I think we prefer the
"Zero Cost Exception" mechanism, which doesn't use setjmp/longjmp
because having an exception handler then costs nothing. We assume
that exceptions are rare occurences, and therefore don't wan't to
spent time setting up a handler if we're not going to use it.

--
Joel