unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
Cc: 62697@debbugs.gnu.org
Subject: bug#62697: gdb-mi.el: Change target-async to mi-async
Date: Thu, 06 Apr 2023 16:32:46 +0300	[thread overview]
Message-ID: <835ya9qgox.fsf@gnu.org> (raw)
In-Reply-To: <CABehr5ca3Xx2udS3vQoj0-xw9-owz8WfopXZALoz8JqjwNnM0w@mail.gmail.com> (message from Gustaf Waldemarson on Thu, 6 Apr 2023 14:48:20 +0200)

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Thu, 6 Apr 2023 14:48:20 +0200
> 
> This may be a bit too early, given how prevalent it is to be using older
> versions of GDB but I figured I should send this patch anyways to get it out of
> my mind:
> 
> For GDB version >= 11, starting up a debugging session with 'gdb-mi.el' always
> ends with this message:
> 
> > (gdb) Warning: 'set target-async', an alias for the command 'set mi-async', is
> > deprecated.  Use 'set mi-async'.
> 
> This is a bit of an eyesore and also breaks the initial prompt (although that is
> easily fixed by pressing enter, etc, but that may still be confusing for new
> users).
> 
> It may be reasonable to either query the GDB version (not sure how though,
> unfortunately) and then use the old command (`set target-async`) or execute the
> non-deprecated command instead (`set mi-async`), and then possibly trying the
> old on if the new one did not work.
> 
> Apparently, `set mi-async` is a GDB 7.8 feature (Released Jul 2014), so this
> change may cause incompatibilities with earlier GDB versions. That said, I
> suspect that it will only cause a warning message to appear for using an
> unsupported command, but unfortunately I don't have an old enough version of GDB
> handy to try that out.
> 
> Any strong opinions either way? The attached patch only replaces the old command
> with the new one, but I'm open for suggestions.

We cannot simply replace the command, as GDB 7.8 is not old enough to
assume it isn't used anymore.

We could either (1) ask GDB about its version, or (2) filter out the
annoying message so it isn't shown to the users; we'd then have to
revisit this if/when GDB actually drops the command, if it ever does.

Alternative (1) is AFAIR problematic because the initialization of a
GDB session under Emacs is entirely asynchronous, so sending a command
and waiting for its response before sending the rest is not easy.  So
I tend to the second alternative.

Thanks.





  reply	other threads:[~2023-04-06 13:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 12:48 bug#62697: gdb-mi.el: Change target-async to mi-async Gustaf Waldemarson
2023-04-06 13:32 ` Eli Zaretskii [this message]
2023-04-07  1:26   ` Jim Porter
2023-04-07  6:26     ` Eli Zaretskii
2023-04-07  7:25       ` Jim Porter
2023-04-07 10:29         ` Eli Zaretskii
2023-04-07 10:36           ` Gustaf Waldemarson
2023-04-07 10:53             ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=835ya9qgox.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=62697@debbugs.gnu.org \
    --cc=gustaf.waldemarson@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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