From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc/rfa(top.c)] catch_exceptions() Date: Wed, 15 Aug 2001 11:25:00 -0000 Message-id: <3B7ABE73.4010207@cygnus.com> References: <3B783BC9.8030603@cygnus.com> <1010815165226.ZM31992@ocotillo.lan> X-SW-Source: 2001-08/msg00182.html > 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