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]

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


On 25/01/2011 08:46, Andrew Burgess wrote:
On 25/01/2011 05:10, Kevin Buettner wrote:
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 think in these cases switching to throw_error (mips_error) or throw_vfatal (mips_kill) might be a better choice.

Of course, I didn't mean throw_vfatal, but throw_fatal (similar to how we have throw_verror and throw_error).


Andrew



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