GNU bug report logs - #64186
Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el

Previous Next

Package: emacs;

Reported by: Wang Diancheng <dianchengwang <at> gmail.com>

Date: Tue, 20 Jun 2023 05:20:01 UTC

Severity: normal

Merged with 63084

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Wang Diancheng <dianchengwang <at> gmail.com>
Cc: luangruo <at> yahoo.com, 64186 <at> 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
> Cc: 64186 <at> debbugs.gnu.org
> From: Wang Diancheng <dianchengwang <at> gmail.com>
> Date: Tue, 20 Jun 2023 17:25:06 +0800
> 
> Po Lu <luangruo <at> 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.




This bug report was last modified 1 year and 313 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.