GNU bug report logs -
#62697
gdb-mi.el: Change target-async to mi-async
Previous Next
Full log
Message #11 received at 62697 <at> debbugs.gnu.org (full text, mbox):
On 4/6/2023 6:32 AM, Eli Zaretskii wrote:
> 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.
I don't know much about gdb-mi.el's internals, but taking a quick look
at the code, 'gdb-input' takes a callback, so something like the
following pseudocode would probably do the trick?
(gdb-input "-gdb-version"
(lambda ()
(if (gdb-should-use-mi-async) ; Check the version output.
(gdb-input "-gdb-set mi-async on" #'ignore)
(gdb-input "-gdb-set target-async on" #'ignore))
(gdb-input "-list-target-features" #'gdb-check-target-async)))
The existing 'gdb-check-target-async' already chains GDB-MI commands
like this, so I imagine the above will Just Work.
This bug report was last modified 2 years and 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.