Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sourceware.org
Subject: deprecated_throw_reason?  (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011)
Date: Tue, 25 Jan 2011 08:42:00 -0000	[thread overview]
Message-ID: <20110124221053.1f12ee32@mesquite.lan> (raw)
In-Reply-To: <20110125015501.GA4054@sourceware.org>

On Tue, 25 Jan 2011 01:55:01 +0000
GDB Administrator <gdbadmin@sourceware.org> wrote:

> > gdb/remote-mips.c:513: deprecated: deprecated throw_reason: Do not use deprecated throw_reason, see declaration for details
> gdb/remote-mips.c:513:  deprecated_throw_reason (RETURN_ERROR);
[...]
> > gdb/remote-mips.c:2285: deprecated: deprecated throw_reason: Do not use deprecated throw_reason, see declaration for details
> gdb/remote-mips.c:2285:	  deprecated_throw_reason (RETURN_QUIT);

Does anyone know how these uses of deprecated_throw_reason should
be fixed?

I've looked at the comment before the declaration of
deprecated_throw_reason().  It reads as follows:

/* Instead of deprecated_throw_reason, code should use catch_exception
   and throw_exception.  */
extern void deprecated_throw_reason (enum return_reason reason)
     ATTRIBUTE_NORETURN;

This sort of makes sense, except that the code in question just
wants to do a throw.  I suppose I could try to inline the relevant
bits from the definition of deprecated_throw_reason(), but that
seems ugly.

I've also looked at the patch where throw_reason() was deprecated.
See:

  http://sourceware.org/ml/gdb-patches/2005-01/msg00199.html

It's interesting to note that with the exception of a use of
deprecated_throw_reason() in breakpoint.c, all other uses (where
the files still exist) are still in the gdb sources today.

I've also looked at the definition of deprecated_throw_reason().  It
seems to me that it's a convenient wrapper for throw_exception().  I'm
wondering if deprecated_throw_reason() ought not to have been
deprecated?   (Note that Eli objected to the patch which performed the
deprecation precisely because no example was given as to how to
perform the conversions - well, at least that's my reading of it.)

Kevin


  reply	other threads:[~2011-01-25  5:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  2:06 New ARI warning Tue Jan 25 01:55:01 UTC 2011 GDB Administrator
2011-01-25  8:42 ` Kevin Buettner [this message]
2011-01-25  8:51   ` deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011) Andrew Burgess
2011-01-25  9:50     ` Andrew Burgess

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=20110124221053.1f12ee32@mesquite.lan \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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