From: Barry OReilly <gundaetiapo@gmail.com>
To: 16745@debbugs.gnu.org
Subject: bug#16745: Can't send SIGTSTP from Emacs through GDB
Date: Thu, 13 Feb 2014 14:33:14 -0500 [thread overview]
Message-ID: <CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]
When running GDB in Emacs and sending SIGTSTP via C-c C-z to another
Emacs ran under GDB, the Emacs under GDB does not appear to receive
the SIGTSTP.
Recipe:
./src/emacs -Q
M-x gdb
gdb -i=mi src/emacs
run -Q
C-c C-z
[The Emacs under GDB is not stopped.]
However, when I run GDB from the shell rather than from Emacs:
gdb src/emacs
run -Q
C-z
[The Emacs under GDB stopped.]
I noticed src/.gdbinit has line:
handle SIGTSTP nopass
So I tried with and without this to no effect.
When I run with these debug statements:
diff --git a/src/process.c b/src/process.c
index 85470b6..176de75 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5753,6 +5753,9 @@ process_send_signal (Lisp_Object process, int signo,
Lisp_Object current_group,
#else
sig_char = &t.c_cc[VSUSP];
#endif
+ { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm); }
+ printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG:
sig_char=%02x\n", // TODO: debugging
+ debug_dateStr, debug_ts.tv_nsec,
getpid(), pthread_self(), __FILE__, __LINE__, *sig_char ); fflush(stdout); }
break;
}
@@ -5901,6 +5904,9 @@ traffic. */)
#ifndef SIGTSTP
error ("No SIGTSTP support");
#else
+ { struct timespec debug_ts; char debug_dateStr[20]; {
clock_gettime(CLOCK_REALTIME, &debug_ts); struct tm mytm;
localtime_r(&debug_ts.tv_sec, &mytm); strftime(debug_dateStr, 20,
"%Y-%m-%dT%H:%M:%S", &mytm); }
+ printf( "%s.%09ld|pid:%d|tid:%ld|%s|%d| DEBUG: Send SIGTSTP\n", //
TODO: debugging
+ debug_dateStr, debug_ts.tv_nsec, getpid(),
pthread_self(), __FILE__, __LINE__ ); fflush(stdout); }
process_send_signal (process, SIGTSTP, current_group, 0);
#endif
return process;
The output during the ill recipe is:
2014-02-13T14:11:49.438466000|pid:22430|tid:47532927609088|process.c|5909|
DEBUG: Send SIGTSTP
2014-02-13T14:11:49.438547000|pid:22430|tid:47532927609088|process.c|5758|
DEBUG: sig_char=1a
So the signal is being sent it seems. What might be the obstruction?
I am on RHEL 5, using latest Emacs from trunk and GDB 7.1.
[-- Attachment #2: Type: text/html, Size: 2600 bytes --]
next reply other threads:[~2014-02-13 19:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-13 19:33 Barry OReilly [this message]
2014-02-14 9:28 ` bug#16745: Can't send SIGTSTP from Emacs through GDB Andreas Schwab
2014-02-14 14:19 ` Barry OReilly
2014-02-14 13:11 ` Daimrod
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFM41H16FKvKi3dhAHDbHc-iysfLDCjO-xAOGf0uC2Td5oopQw@mail.gmail.com \
--to=gundaetiapo@gmail.com \
--cc=16745@debbugs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.