Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfc/rfa(top.c)] catch_exceptions()
Date: Wed, 15 Aug 2001 11:25:00 -0000	[thread overview]
Message-ID: <3B7ABE73.4010207@cygnus.com> (raw)
In-Reply-To: <1010815165226.ZM31992@ocotillo.lan>

> 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



      reply	other threads:[~2001-08-15 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-13 13:43 Andrew Cagney
2001-08-15  9:52 ` Kevin Buettner
2001-08-15 11:25   ` Andrew Cagney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3B7ABE73.4010207@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=kevinb@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox