diff options
author | Christopher Faylor <me@cgf.cx> | 2005-11-01 05:55:30 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-11-01 05:55:30 +0000 |
commit | b7bb9f5fde5ec1df374b969b196325d935d6e771 (patch) | |
tree | 7df4d4741fcdc42aa809c3497d98eb29c50dc789 /winsup/cygwin | |
parent | dc1b6289a6f9f9d60f741b9a4270ea3a43c57c32 (diff) | |
download | newlib-b7bb9f5fde5ec1df374b969b196325d935d6e771.zip newlib-b7bb9f5fde5ec1df374b969b196325d935d6e771.tar.gz newlib-b7bb9f5fde5ec1df374b969b196325d935d6e771.tar.bz2 |
* 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')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 11 | ||||
-rw-r--r-- | winsup/cygwin/include/sys/cygwin.h | 2 |
3 files changed, 14 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5460fb9..779e545 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2005-11-01 Christopher Faylor <cgf@timesys.com> + + * 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. + 2005-10-29 Christopher Faylor <cgf@timesys.com> * exceptions.cc (signal_exit): Eliminate setting of main thread diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index fc58bdf..26594cd 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) { diff --git a/winsup/cygwin/include/sys/cygwin.h b/winsup/cygwin/include/sys/cygwin.h index 7fa6263..fe4aea4 100644 --- a/winsup/cygwin/include/sys/cygwin.h +++ b/winsup/cygwin/include/sys/cygwin.h @@ -17,6 +17,8 @@ details. */ extern "C" { #endif +#define _CYGWIN_SIGNAL_STRING "cYgSiGw00f" + extern pid_t cygwin32_winpid_to_pid (int); extern void cygwin32_win32_to_posix_path_list (const char *, char *); extern int cygwin32_win32_to_posix_path_list_buf_size (const char *); |