[rfc/rfa(top.c)] catch_exceptions()
Andrew Cagney
ac131313@cygnus.com
Wed Aug 15 11:25:00 GMT 2001
> On Aug 13, 4:42pm, Andrew Cagney wrote:
>
>
>> The attatched patch impements a successor to catch_errors() -
>> catch_exceptions().
>
> [...]
>
>> Comments. Any preference for the other. Ok for top.c?
>
>
> I reviewed your patch and it looks fine to me. I wonder though if
> it might not be better to implement catch_errors() in terms of
> catch_exceptions() in order to make sure that the new code gets
> thoroughly tested from the outset.
Thanks for the comments. I thought about having catch_errors() just use
catch_exceptions() (and not have the catcher() function). Problem is, I
don't see a correct way of doing this. catch_exceptions() places very
strict requirements on FUNC(), catch_errors() doesn't have any (any
return value is technically legal). Consequently the assertion:
gdb_assert (val >= 0);
can't be applied to catch_errors().
Anyway, the code is going to be tested ``almost'' from the outset :-)
My next patch is to change the gdb_*() libgdb functions to use this.
Andrew
More information about the Gdb-patches
mailing list