public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* Annoying deprecation messages from GDB/MI
@ 2023-04-07 11:09 Eli Zaretskii
  0 siblings, 0 replies; only message in thread
From: Eli Zaretskii @ 2023-04-07 11:09 UTC (permalink / raw)
  To: gdb-patches

With the current GDB:

  gdb --i=mi ./SOME-PROGRAM
  [...]
  (gdb)
  -gdb-set target-async 1
  ~"Warning: 'set target-async', an alias for the command 'set mi-async', is deprecated.\n"
  ~"Use 'set mi-async'.\n\n"
  ^done

What is the purpose of emitting these deprecation warnings for MI
commands?  I can understand why we emit such warnings for CLI
commands: those are commands that users type, so we want them to use
the advertised names, not the deprecated aliases.  But GDB/MI is a
protocol for GDB front-ends, and if the front-end happens to use a
deprecated command, the user can do nothing about it.  So the net
effect of this is to annoy users, for no good reason.  ("For no good
reason" because we may never actually remove the deprecated alias, as
we do with many deprecated features, witness the fate of the GDB
annotations.  At the very least, the actual removal is in a very
distant future, if ever.)

AFAICT from looking in the sources, this warning comes from the CLI
interface, not from MI.  Would it be possible to suppress the
deprecation warning when the command was invoked via MI?  Should I
submit a patch to that effect?

Thanks.

P.S. For one real-life case where this matters, see

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62697

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-07 11:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-07 11:09 Annoying deprecation messages from GDB/MI Eli Zaretskii

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).