delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/28/21:20:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20040429012002.26501.qmail@web41101.mail.yahoo.com>
Date: Wed, 28 Apr 2004 18:20:02 -0700 (PDT)
From: Vincent Amiot <vamiot AT yahoo DOT com>
Subject: 1.5.9:sigaction v. signal: context needed!
To: Cygwin AT cygwin DOT com
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019