This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GDB signal handling not working (stop, print, nopass, etc)


Hi folks. I am desperate to get the "handle" command of gdb working under
Cygwin. Try as I might, I can't get gdb to stop, print, or "nopass"
signals like SIGUSR1 or SIGHUP to the process being debugged.

I made up a simple hello world program that just prints "Hello World"
then sleeps for 30 seconds. If I debug this, and send a SIGUSR1 from
a different shell window, I cannot get gdb to notice the signal. 
The program always just exits, and gdb says "Program exited normally"
or "Program exited with code xxxx".

I need gdb to be able to stop on, print out, or block such signals. I have
a piece of software I need to debug which is exiting "normally" but I
need the debugger to stop at the point of exit and give me a traceback
so I can figure out why. I tried setting breakpoints at "exit" and "_exit"
but these are not getting hit, which is why I think it's a signal.

Any help is appreciated. I searched the archives but I can't find an
answer there. My cygwin version is:

786k 1999/09/14 E:\Cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                "cygwin1.dll" v0.0 ts=1999/9/13 23:44

My gdb is: GNU gdb 4.18-cygwin-990830

This is all straight of an install CD without any patches. I did try running
the latest gdb.exe from June 11 2000 (v5.0) without really installing,
and it does the same thing, i.e. handle commmand has no effect on signals.

Thanks!
Max
-- 
Max Feil                          |  Email: mfeil@qnx.com
QNX Software Systems Ltd.         |  Web: http://www.qnx.com/~mfeil
Kanata, Ontario, Canada.          |  Work Phone: (613) 591-0836 x226
"The leading realtime OS for PC's"|         Fax: (613) 591-0592



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]