* Catch signals in GDBserver running on windows under cygwin
@ 2002-05-27 8:46 Christophe PLANAT
2002-05-27 11:06 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Christophe PLANAT @ 2002-05-27 8:46 UTC (permalink / raw)
To: gdb
Hi all,
I am using GDBserver running on windows under CYGWIN (GDB is running on
the other side).
When GDBServer is runnning (augmented of several debug printing) a DOS
window is open. If this DOS window is killed or closed (by using the
small cross in the upper right corner), I wish to catch the
corresponding signal and warn the GDB client that the server is down.
How to catch such signals on Windows NT (or 98) ? I tried several
signal() on signals recognized on window (SIGABRT, ILL, INT, SEGV and
TERM) without any success.
Thanks for any help
Christophe
--
----------------------------------------------------------------------
| Christophe PLANAT | Embedded Systems Technology |
| Email : Christophe.Planat@st.com | STMicroelectronics |
| Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
| Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Catch signals in GDBserver running on windows under cygwin
2002-05-27 8:46 Catch signals in GDBserver running on windows under cygwin Christophe PLANAT
@ 2002-05-27 11:06 ` Daniel Jacobowitz
2002-05-28 0:19 ` Christophe PLANAT
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-05-27 11:06 UTC (permalink / raw)
To: Christophe PLANAT; +Cc: gdb
On Mon, May 27, 2002 at 05:48:37PM +0200, Christophe PLANAT wrote:
> Hi all,
>
> I am using GDBserver running on windows under CYGWIN (GDB is running on
> the other side).
Curious - what version of gdbserver? I don't know of any FSF version that
supported cygwin.
> When GDBServer is runnning (augmented of several debug printing) a DOS
> window is open. If this DOS window is killed or closed (by using the
> small cross in the upper right corner), I wish to catch the
> corresponding signal and warn the GDB client that the server is down.
>
> How to catch such signals on Windows NT (or 98) ? I tried several
> signal() on signals recognized on window (SIGABRT, ILL, INT, SEGV and
> TERM) without any success.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Catch signals in GDBserver running on windows under cygwin
2002-05-27 11:06 ` Daniel Jacobowitz
@ 2002-05-28 0:19 ` Christophe PLANAT
2002-05-28 1:15 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Christophe PLANAT @ 2002-05-28 0:19 UTC (permalink / raw)
To: gdb
"drow/OU=internet/DD.RFC-822=drow"@mvista.com@harley wrote:
>
> On Mon, May 27, 2002 at 05:48:37PM +0200, Christophe PLANAT wrote:
> > Hi all,
> >
> > I am using GDBserver running on windows under CYGWIN (GDB is running on
> > the other side).
>
> Curious - what version of gdbserver? I don't know of any FSF version that
> supported cygwin.
But it works well. Windows NT + layer of cygwin Posix emulation dll
(1.3.5) and gcc 2.95.3-5 (cygwin special) running on the top, for GDB
and GDBServer 5.0 compilation. The 2 win32 runtime run correctly.
I've heard that some difficulties exist to catch signals thru cygwin
layer and that the classical signal(), raise() ... primitives don't
"work" well but I don't have any info about it.
>
> > When GDBServer is runnning (augmented of several debug printing) a DOS
> > window is open. If this DOS window is killed or closed (by using the
> > small cross in the upper right corner), I wish to catch the
> > corresponding signal and warn the GDB client that the server is down.
> >
> > How to catch such signals on Windows NT (or 98) ? I tried several
> > signal() on signals recognized on window (SIGABRT, ILL, INT, SEGV and
> > TERM) without any success.
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
--
----------------------------------------------------------------------
| Christophe PLANAT | Embedded Systems Technology |
| Email : Christophe.Planat@st.com | STMicroelectronics |
| Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
| Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Catch signals in GDBserver running on windows under cygwin
2002-05-28 0:19 ` Christophe PLANAT
@ 2002-05-28 1:15 ` Daniel Jacobowitz
2002-05-28 10:41 ` Christopher Faylor
2002-05-30 8:59 ` Christophe PLANAT
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2002-05-28 1:15 UTC (permalink / raw)
To: Christophe PLANAT; +Cc: gdb
On Tue, May 28, 2002 at 09:22:20AM +0200, Christophe PLANAT wrote:
> "drow/OU=internet/DD.RFC-822=drow"@mvista.com@harley wrote:
> >
> > On Mon, May 27, 2002 at 05:48:37PM +0200, Christophe PLANAT wrote:
> > > Hi all,
> > >
> > > I am using GDBserver running on windows under CYGWIN (GDB is running on
> > > the other side).
> >
> > Curious - what version of gdbserver? I don't know of any FSF version that
> > supported cygwin.
>
> But it works well. Windows NT + layer of cygwin Posix emulation dll
> (1.3.5) and gcc 2.95.3-5 (cygwin special) running on the top, for GDB
> and GDBServer 5.0 compilation. The 2 win32 runtime run correctly.
But gdbserver 5.0 wouldn't build on Cygwin... did the Cygwin people
include their own version?
>
> I've heard that some difficulties exist to catch signals thru cygwin
> layer and that the classical signal(), raise() ... primitives don't
> "work" well but I don't have any info about it.
>
> >
> > > When GDBServer is runnning (augmented of several debug printing) a DOS
> > > window is open. If this DOS window is killed or closed (by using the
> > > small cross in the upper right corner), I wish to catch the
> > > corresponding signal and warn the GDB client that the server is down.
> > >
> > > How to catch such signals on Windows NT (or 98) ? I tried several
> > > signal() on signals recognized on window (SIGABRT, ILL, INT, SEGV and
> > > TERM) without any success.
> >
> > --
> > Daniel Jacobowitz Carnegie Mellon University
> > MontaVista Software Debian GNU/Linux Developer
>
> --
> ----------------------------------------------------------------------
> | Christophe PLANAT | Embedded Systems Technology |
> | Email : Christophe.Planat@st.com | STMicroelectronics |
> | Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
> | Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
> ----------------------------------------------------------------------
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Catch signals in GDBserver running on windows under cygwin
2002-05-28 1:15 ` Daniel Jacobowitz
@ 2002-05-28 10:41 ` Christopher Faylor
2002-05-30 8:59 ` Christophe PLANAT
1 sibling, 0 replies; 6+ messages in thread
From: Christopher Faylor @ 2002-05-28 10:41 UTC (permalink / raw)
To: gdb; +Cc: Christophe PLANAT
On Tue, May 28, 2002 at 04:15:26AM -0400, Daniel Jacobowitz wrote:
>But gdbserver 5.0 wouldn't build on Cygwin... did the Cygwin people
>include their own version?
Nope.
cgf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Catch signals in GDBserver running on windows under cygwin
2002-05-28 1:15 ` Daniel Jacobowitz
2002-05-28 10:41 ` Christopher Faylor
@ 2002-05-30 8:59 ` Christophe PLANAT
1 sibling, 0 replies; 6+ messages in thread
From: Christophe PLANAT @ 2002-05-30 8:59 UTC (permalink / raw)
To: gdb
"drow/OU=internet/DD.RFC-822=drow"@mvista.com@harley wrote:
>
> On Tue, May 28, 2002 at 09:22:20AM +0200, Christophe PLANAT wrote:
> > "drow/OU=internet/DD.RFC-822=drow"@mvista.com@harley wrote:
> > >
> > > On Mon, May 27, 2002 at 05:48:37PM +0200, Christophe PLANAT wrote:
> > > > Hi all,
> > > >
> > > > I am using GDBserver running on windows under CYGWIN (GDB is running on
> > > > the other side).
> > >
> > > Curious - what version of gdbserver? I don't know of any FSF version that
> > > supported cygwin.
> >
> > But it works well. Windows NT + layer of cygwin Posix emulation dll
> > (1.3.5) and gcc 2.95.3-5 (cygwin special) running on the top, for GDB
> > and GDBServer 5.0 compilation. The 2 win32 runtime run correctly.
>
> But gdbserver 5.0 wouldn't build on Cygwin... did the Cygwin people
> include their own version?
>
> >
> > I've heard that some difficulties exist to catch signals thru cygwin
> > layer and that the classical signal(), raise() ... primitives don't
> > "work" well but I don't have any info about it.
> >
> > >
> > > > When GDBServer is runnning (augmented of several debug printing) a DOS
> > > > window is open. If this DOS window is killed or closed (by using the
> > > > small cross in the upper right corner), I wish to catch the
> > > > corresponding signal and warn the GDB client that the server is down.
> > > >
> > > > How to catch such signals on Windows NT (or 98) ? I tried several
> > > > signal() on signals recognized on window (SIGABRT, ILL, INT, SEGV and
> > > > TERM) without any success.
> > >
> > > --
> > > Daniel Jacobowitz Carnegie Mellon University
> > > MontaVista Software Debian GNU/Linux Developer
> >
> > --
> > ----------------------------------------------------------------------
> > | Christophe PLANAT | Embedded Systems Technology |
> > | Email : Christophe.Planat@st.com | STMicroelectronics |
> > | Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
> > | Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
> > ----------------------------------------------------------------------
>
> --
> Daniel Jacobowitz Carnegie Mellon University
> MontaVista Software Debian GNU/Linux Developer
I succedded to implement a such mechanism described in MSDN library :
- In the main() server.c, call SetConsoleCtrlHandler(my_handler, TRUE)
- don't forget to include <windows.h>
- implement char WINAPI my_handler (DWORD dwCtrlType) and treat
signals...
I can catch CTRL-C, CTRL-BREAK and DOS windows closing.
Thanks for your interest to my request. Hope this will help somebody
Christophe
--
----------------------------------------------------------------------
| Christophe PLANAT | Embedded Systems Technology |
| Email : Christophe.Planat@st.com | STMicroelectronics |
| Phone : +33 04 76 92 68 82 | 850, rue Jean-Monnet |
| Fax : +33 04 76 92 50 94 | BP 16 - 38921 Crolles - France |
----------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-05-30 15:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-27 8:46 Catch signals in GDBserver running on windows under cygwin Christophe PLANAT
2002-05-27 11:06 ` Daniel Jacobowitz
2002-05-28 0:19 ` Christophe PLANAT
2002-05-28 1:15 ` Daniel Jacobowitz
2002-05-28 10:41 ` Christopher Faylor
2002-05-30 8:59 ` Christophe PLANAT
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox