Mail Archives: cygwin/2004/04/28/21:20:33
It seems that as of Cygwin 1.5.9 SA_SIGACTION is
supported, the 3rd parameter of the sa_sigaction
handler should hopefully be some flavor of the signal
context???? Unfortunately the 3rd parameter seems to
be NULL. even though I install the handlers as
follows:
--------------------------------------------------------------------------------
struct sigaction sigactions[NSIG];
void Trap (int signum, siginfo_t *siginfo, void
*context) {
}
[...]
#if defined (__CYGWIN__)
for (i = 0; i < NSIG; i++)
if ((i != SIGTRAP) && (i != SIGINT) && (i !=
SIGALRM)) {
sigactions[i].sa_sigaction = Trap;
sigactions[i].sa_flags = SA_RESTART |
SA_SIGINFO; // SA_ONSTACK not available in this
version of CygWin
sigactions[i].sa_mask = 0;
sigaction (i, &(sigactions[i]), NULL);
// signal (i, Trap_Emulate);
XPRINTF1 ((stderr, "Installing Signal: %d
(%s)\n", i, strsignal(i)));
}
#elif defined(__WIN32__)
--------------------------------------------------------------------------------
Starting program:
/cygdrive/c/Current/activada_source/RTS_TOOLS/Tests/ACVC1.11/a21001a.exe
Simulator was only tested with Cygwin release 1.5.5
sysname: CYGWIN_NT-5.0
nodename: la-jolla
release: 1.5.9(0.112/4/2)
version: 2004-04-17 22:44
machine: i686
Breakpoint 1, Trap (signum=4, siginfo=0xea60,
context=0x0) at initsys.c:938
--------------------------------------------------------------------------------
On Cygwin 1.5.5 I wuz able to retrieve the context
(and modify it to implement some lame version of Trap
& Emulate): any thoughts on how I should go about
this... short of re-reverse engineer the stack (it
seems the first frame < 0x60000000 from the handler
is e0 and 2 notches above we have in0: it's do-able be
yuk!)
any suggestion in this area would be most welcome ;-)!
Many thanks
Vin
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -