unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Guilhem Bichot <guilhem.bichot@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 23720@debbugs.gnu.org
Subject: bug#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25
Date: Fri, 10 Jun 2016 10:41:27 +0200	[thread overview]
Message-ID: <575A7D37.20108@oracle.com> (raw)
In-Reply-To: <831t46qviz.fsf@gnu.org>

Hello,

Eli Zaretskii a écrit le 09/06/2016 16:36 :
>> Cc: 23720@debbugs.gnu.org
>> From: Guilhem Bichot <guilhem.bichot@oracle.com>
>> Date: Thu, 9 Jun 2016 16:30:16 +0200
>>
>>>> Pressing this STOP button in emacs23 does interrupt it.
>>>> It doesn't anymore in emacs24.
>>>> Is it considered normal?
>>>
>>> I don't think so, but I don't have any more wisdom to offer about
>>> this.  AFAIU, -exec-interrupt should have interrupted your program,
>>> unless it masks signals.
>>
>> I see. When I find the time, I'll try diff-ing the code of gud-gdb and
>> of gdb-mi to find what magic the gud-gdb STOP button has, which makes it
>> have "a stronger interruption effect".
>> If I find anything, I'll report it here.
>
> I think the answer to that is clear from this:
>
>    (defun gud-stop-subjob ()
>      (interactive)
>      (with-current-buffer gud-comint-buffer
>        (cond ((string-equal gud-target-name "emacs")
> 	     (comint-stop-subjob))
> 	    ((eq gud-minor-mode 'jdb)
> 	     (gud-call "suspend"))
> 	    ((eq gud-minor-mode 'gdbmi)
> 	     (gud-call (gdb-gud-context-command "-exec-interrupt")))
> 	    (t
> 	     (comint-interrupt-subjob)))))
>
> As you see i works differently depending on whether gdb-mi is used or
> not.  What I don't understand is why -exec-interrupt doesn't do its
> job in your case.

It's isn't mysql-related. I create the simple a.cc:

int main()
{
   long long int x;
   for (x= 1; x; x++)
     ;
   return 0;
}

I compile:
g++ -g a.cc

I open a.cc in emacs25, M-x gdb, "run"; it prints
(gdb) r
Starting program: /home/mysql_src/tmp/a.out

the long "for" loop is running, I press the STOP button, it prints 
"command: -exec-interrupt", and the program apparently doesn't stop (as 
there is no change at the prompt). To be sure about "doesn't stop", I 
try with this program

#include <iostream>
#include <unistd.h>
int main()
{
   long long int x;
   for (x= 1; x; x++)
   {
     std::cout << x << std::endl;
     sleep(1);
   }
   return 0;
}

And, likewise, the printouts continue, undisturbed by the click on STOP.

For what it's worth, the menu Signals->Break interrupts it and I 
properly get:

Program received signal SIGINT, Interrupt.
0x0000000000400509 in main () at a.cc:4
4	  for (x= 1; x; x++)
(gdb)

I'm using Ubuntu 15.10.





  reply	other threads:[~2016-06-10  8:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07  9:30 bug#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25 Guilhem Bichot
2016-06-07 17:15 ` Eli Zaretskii
2016-06-07 18:54   ` Eli Zaretskii
2016-06-09  7:42     ` Guilhem Bichot
2016-06-10  9:00       ` Eli Zaretskii
2020-08-24 18:15         ` Lars Ingebrigtsen
2016-06-09  8:14   ` Guilhem Bichot
2016-06-09 12:17     ` Eli Zaretskii
2016-06-09 13:46       ` Guilhem Bichot
2016-06-09 14:12         ` Eli Zaretskii
2016-06-09 14:30           ` Guilhem Bichot
2016-06-09 14:36             ` Eli Zaretskii
2016-06-10  8:41               ` Guilhem Bichot [this message]
2016-06-10  9:52                 ` 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=575A7D37.20108@oracle.com \
    --to=guilhem.bichot@oracle.com \
    --cc=23720@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).