unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Wang Diancheng <dianchengwang@gmail.com>
Cc: luangruo@yahoo.com, 64186@debbugs.gnu.org
Subject: bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el
Date: Tue, 20 Jun 2023 14:55:56 +0300	[thread overview]
Message-ID: <83352m73g3.fsf@gnu.org> (raw)
In-Reply-To: <CADmgXh5nvYtQG87ZRwydGA66-=He4Yq=9vB9LZJ_zMd-kisaDQ@mail.gmail.com> (message from Wang Diancheng on Tue, 20 Jun 2023 17:25:06 +0800)

> Cc: 64186@debbugs.gnu.org
> From: Wang Diancheng <dianchengwang@gmail.com>
> Date: Tue, 20 Jun 2023 17:25:06 +0800
> 
> Po Lu <luangruo@yahoo.com> 于2023年6月20日周二 15:24写道:
> >
> > What about versions of GDB earlier than 7.7?  We should detect them, and
> > use `set mi-async' there.
> >
> Like other places of gdb-mi.el,  function gdb-set-mi-async-handler()
> will use 'set target-async' if GDB (versions earlier than 7.7) reports
> "No symbol".

Isn't that too late, though?  The GDB manual says:

  On some targets, GDB is capable of processing MI commands even while the
  target is running.  This is called "asynchronous command execution"
  (*note Background Execution::).  The frontend may specify a preference
  for asynchronous execution using the '-gdb-set mi-async 1' command,
  which should be emitted before either running the executable or
  attaching to the target.

However, the gdb-input call sends the request without waiting for the
response, so the handler of the response will be invoked much later,
after GDB already processed quite a few commands sent to it by Emacs
in the meantime.  Thus, by the time gdb-set-mi-async-handler is
called, and we see the "No symbol" thingy and send the target-async
command instead, it could be too late, because the executable was
already run.

There's actually more here than meets the eye; see bug#63084.

Given all that mess, I wonder if "M-x gdb" in its current shape indeed
supports the asynchronous execution.  If it doesn't, we may be better
off not sending that command at all for now, until bug#63084 is fixed.





  parent reply	other threads:[~2023-06-20 11:55 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20  2:21 bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el Wang Diancheng
2023-06-20  7:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-20  9:25   ` Wang Diancheng
2023-06-20  9:43     ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-20 11:55     ` Eli Zaretskii [this message]
2023-06-21  6:49       ` Wang Diancheng
2023-06-21 13:12         ` Eli Zaretskii
2023-06-28  3:51           ` Wang Diancheng
2023-06-29  6:09             ` Eli Zaretskii
2023-06-30  7:08               ` Wang Diancheng
2023-07-06  7:10                 ` Eli Zaretskii
2023-04-25 19:18                   ` bug#63084: 30.0.50; gud: set breakpoint while program is running tatrics
2023-04-26  6:10                     ` Eli Zaretskii
2023-04-26  8:48                       ` TatriX
2023-04-26  9:44                         ` Eli Zaretskii
2023-04-26 11:19                           ` Eli Zaretskii
2023-04-26 11:49                             ` TatriX
2023-05-05  5:52                             ` Eli Zaretskii
2023-05-05  5:53                           ` Eli Zaretskii
2023-05-05  7:15                             ` TatriX
2023-05-06 11:43                               ` Eli Zaretskii
2023-05-27 21:22                                 ` TatriX
2023-05-28  5:28                                   ` Eli Zaretskii
2023-05-28 21:10                                     ` TatriX
2023-05-29 11:45                                       ` Eli Zaretskii
     [not found]                     ` <handler.63084.D64186.168862741914107.notifdone@debbugs.gnu.org>
2023-07-11  7:31                       ` bug#63084: closed (Re: bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el) TatriX
2023-07-11 12:24                         ` Eli Zaretskii
2023-07-11 15:30                           ` TatriX
2023-07-11 15:56                             ` Eli Zaretskii
2023-07-11 17:49                               ` TatriX
2023-07-13  6:26                                 ` Eli Zaretskii
2023-07-07  6:25                   ` bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el Wang Diancheng
2023-07-07  6:42                     ` 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=83352m73g3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=64186@debbugs.gnu.org \
    --cc=dianchengwang@gmail.com \
    --cc=luangruo@yahoo.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).