This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]