Subject: bug#14597: 24.3.50; Can't stop the program being debugged with gdb-mi

From: Eli Zaretskii <[email-masked]>
Date: Wed, 09 Sep 2020 18:12:22 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 09 Sep 2020 15:47:29 +0200
> Cc: [email-masked]
> 
> Daimrod <[email-masked]> writes:
> 
> > -  (stop-process
> > -   (get-buffer-process gud-comint-buffer) comint-ptyp))
> > +  (process-send-string (get-buffer-process
> > +                        (gdb-get-buffer-create 'gdb-inferior-io))
> > +                       (kbd "C-z")))
> 
> There were unfortunately no comments at the time (seven years ago), but
> the code in gdb-mi essentially looks the same to this day.
> 
> I'm not very familiar with gdb-mi, though -- does anybody have an
> opinion here?

Can you try this with a recent GDB?  AFAIR, it nowadays better
separates the command file descriptor from the program's I/O
descriptors, so perhaps the problem is fixed.

Note that you need to type C-z/C-c C-z into the buffer where the
program's I/O is redirected.