Subject: Re: bug#63084: closed (Re: bug#64186: Patch: Suppress deprecated '-gdb-set target-async' warning message in gdb-mi.el)

From: Eli Zaretskii <[email-masked]>
Date: Thu, 13 Jul 2023 09:26:07 +0300

> From: TatriX <[email-masked]>
> Date: Tue, 11 Jul 2023 19:49:15 +0200
> Cc: [email-masked]
> 
> > So what doesn't work, and how does it not work?
> Did a few more tests to see what actually happens.
> I'm running the same code as before in "emacs -Q"
>     > run &
>     C-x C-a C-b ;; sets breakpoint successfully
>     C-x C-a C-d ;; removes breakpoint
>     > c &
> After that program continues, but 'gud-running' is now t, even if I ">
> kill" the program and "> run&" it again.

So it's a separate problem: some code sets gud-running even though
this is async mode.

Can you figure which function sets gud-running when you type "c&"?  My
first suspect is gdb-starting, because it sets gud-running
unconditionally instead of doing this:

  (when (not gdb-non-stop)
    (setq gud-running t))

like gdb-running does.  The other suspect is gdb-update-gud-running.