public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* New ARI warning Tue Jan 25 01:55:01 UTC 2011
@ 2011-01-25  2:06 GDB Administrator
  2011-01-25  8:42 ` deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011) Kevin Buettner
  0 siblings, 1 reply; 4+ messages in thread
From: GDB Administrator @ 2011-01-25  2:06 UTC (permalink / raw)
  To: gdb-patches

861a862,894
> 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:675: gettext: trailing new line: A message should not have a trailing new line
gdb/remote-mips.c:675:      error (_("Watchdog has expired.  Target detached.\n"));
> gdb/remote-mips.c:1264: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:1264:	sprintf (buff, ', cmd,
> gdb/remote-mips.c:1267: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:1267:	sprintf (buff, ', cmd,
> gdb/remote-mips.c:1416: gettext: _ markup: All messages should be marked up with _.
gdb/remote-mips.c:1416:      warning ("internal error: mips_initialize called twice");
> gdb/remote-mips.c:1460: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:1460:		sprintf (tbuff, ');
> gdb/remote-mips.c:1614: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/remote-mips.c:1614:	    if ((local_name = strchr (remote_name, '.')) != NULL)
> gdb/remote-mips.c:1645: deprecated: deprecated mips_set_processor_regs_hack: Do not use deprecated mips_set_processor_regs_hack, see declaration for details
gdb/remote-mips.c:1645:  deprecated_mips_set_processor_regs_hack ();
> 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);
> gdb/remote-mips.c:2322: gettext: _ markup: All messages should be marked up with _.
gdb/remote-mips.c:2322:      warning ("\
> gdb/remote-mips.c:2581: gettext: _ markup: All messages should be marked up with _.
gdb/remote-mips.c:2581:	      warning ("\
> gdb/remote-mips.c:2588: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:2588:	  sprintf (buf, ', i);
> gdb/remote-mips.c:2630: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:2630:	      sprintf (buf, ', phex_nz (addr, addr_size));
> gdb/remote-mips.c:2636: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:2636:	      sprintf (buf, ',
> gdb/remote-mips.c:2703: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:2703:	  sprintf (buf, ', phex_nz (addr, addr_size),
> gdb/remote-mips.c:2709: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:2709:	  sprintf (buf, ', phex_nz (addr, addr_size));
> gdb/remote-mips.c:2770: gettext: trailing new line: A message should not have a trailing new line
gdb/remote-mips.c:2770:	  error (_("Download got unexpected ack char: 0x%x, retrying.\n"),
> gdb/remote-mips.c:2829: deprecated: deprecated ui_load_progress_hook: Do not use deprecated ui_load_progress_hook, see declaration for details
gdb/remote-mips.c:2829:	      if (deprecated_ui_load_progress_hook)
> gdb/remote-mips.c:2830: deprecated: deprecated ui_load_progress_hook: Do not use deprecated ui_load_progress_hook, see declaration for details
gdb/remote-mips.c:2830:		deprecated_ui_load_progress_hook (s->name, i);
> gdb/remote-mips.c:3024: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3024:  sprintf (*buff, ');
> gdb/remote-mips.c:3051: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3051:  sprintf (*buff, ');
> gdb/remote-mips.c:3054: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3054:  sprintf (*buff, ');
> gdb/remote-mips.c:3120: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3120:	  sprintf (p, ');
> gdb/remote-mips.c:3195: code: if assignment: An IF statement's expression contains an assignment (the GNU coding standard discourages this)
gdb/remote-mips.c:3195:      if ((tftp_file = fopen (tftp_localname, ')) == NULL)
> gdb/remote-mips.c:3242: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3242:  sprintf (hexnumber, ', final);
> gdb/remote-mips.c:3257: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3257:  sprintf (hexnumber, ', bintotal);
> gdb/remote-mips.c:3391: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3391:  sprintf (buffer, ');
> gdb/remote-mips.c:3408: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3408:	sprintf (buffer, ');
> gdb/remote-mips.c:3453: deprecated: deprecated ui_load_progress_hook: Do not use deprecated ui_load_progress_hook, see declaration for details
gdb/remote-mips.c:3453:			if (deprecated_ui_load_progress_hook)
> gdb/remote-mips.c:3454: deprecated: deprecated ui_load_progress_hook: Do not use deprecated ui_load_progress_hook, see declaration for details
gdb/remote-mips.c:3454:			  deprecated_ui_load_progress_hook (s->name, i);
> gdb/remote-mips.c:3488: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3488:  sprintf (buffer, ');	 
> gdb/remote-mips.c:3573: code: sprintf: Do not use sprintf, instead use xstrprintf
gdb/remote-mips.c:3573:  sprintf (buf, ', args);
> gdb/remote-mips.c:3600: deprecated: deprecated xfer_memory: Do not use deprecated xfer_memory, see declaration for details
gdb/remote-mips.c:3600:  mips_ops.deprecated_xfer_memory = mips_xfer_memory;
1194d1226
< gdb/valprint.c:1174: code: OP eol: Do not use &&, or || at the end of a line
gdb/valprint.c:1174:      while ((rep1 < len) &&

^ permalink raw reply	[flat|nested] 4+ messages in thread

* deprecated_throw_reason?  (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011)
  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
  2011-01-25  8:51   ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Buettner @ 2011-01-25  8:42 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011)
  2011-01-25  8:42 ` deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011) Kevin Buettner
@ 2011-01-25  8:51   ` Andrew Burgess
  2011-01-25  9:50     ` Andrew Burgess
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Burgess @ 2011-01-25  8:51 UTC (permalink / raw)
  To: gdb-patches

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.

The text that is currently printed unconditionally in mips_error could 
become the message for throw_error and GENERIC_ERROR the error type.

Andrew

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011)
  2011-01-25  8:51   ` Andrew Burgess
@ 2011-01-25  9:50     ` Andrew Burgess
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Burgess @ 2011-01-25  9:50 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-01-25  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25  2:06 New ARI warning Tue Jan 25 01:55:01 UTC 2011 GDB Administrator
2011-01-25  8:42 ` deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011) Kevin Buettner
2011-01-25  8:51   ` Andrew Burgess
2011-01-25  9:50     ` Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).