summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-11-01 05:55:30 +0000
committerChristopher Faylor <me@cgf.cx>2005-11-01 05:55:30 +0000
commitb7bb9f5fde5ec1df374b969b196325d935d6e771 (patch)
tree7df4d4741fcdc42aa809c3497d98eb29c50dc789 /winsup/cygwin/exceptions.cc
parentdc1b6289a6f9f9d60f741b9a4270ea3a43c57c32 (diff)
downloadcygnal-b7bb9f5fde5ec1df374b969b196325d935d6e771.tar.gz
cygnal-b7bb9f5fde5ec1df374b969b196325d935d6e771.tar.bz2
cygnal-b7bb9f5fde5ec1df374b969b196325d935d6e771.zip
* include/sys/cygwin.h: Define CYGWIN_SIGNAL_STRING.
* exceptins.cc (sigpacket::process): Send a _CYGWIN_SIGNAL_STRING to gdb if the process is being debugged. A WIP.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index fc58bdf22..26594cd40 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1095,11 +1095,12 @@ sigpacket::process ()
if (si.si_signo == SIGTSTP || si.si_signo == SIGTTIN || si.si_signo == SIGTTOU)
sig_clear (SIGCONT);
-#if 0
- char sigmsg[24];
- __small_sprintf (sigmsg, "cygwin: signal %d\n", si.si_signo);
- OutputDebugString (sigmsg);
-#endif
+ if (being_debugged ())
+ {
+ char sigmsg[sizeof (_CYGWIN_SIGNAL_STRING " 0xffffffff")];
+ __small_sprintf (sigmsg, _CYGWIN_SIGNAL_STRING " %p", si.si_signo);
+ OutputDebugString (sigmsg);
+ }
if (handler == (void *) SIG_DFL)
{