* sigproc.h [sigthread]: Add exception field.
[sigframe::~sigframe]: Clear exception field. [sigframe::set]: Set exception field from caller. * sigproc.cc (sig_send): Set exception field when frame pointer is passed in. * exceptions.cc (interrupt_on_return): Always treat exception as interruptible.
This commit is contained in:
parent
86699e1555
commit
968d91b2e6
|
@ -1,3 +1,13 @@
|
||||||
|
Wed Apr 25 15:07:37 2001 Christopher Faylor <cgf@cygnus.com>
|
||||||
|
|
||||||
|
* sigproc.h [sigthread]: Add exception field. [sigframe::~sigframe]:
|
||||||
|
Clear exception field. [sigframe::set]: Set exception field from
|
||||||
|
caller.
|
||||||
|
* sigproc.cc (sig_send): Set exception field when frame pointer is
|
||||||
|
passed in.
|
||||||
|
* exceptions.cc (interrupt_on_return): Always treat exception as
|
||||||
|
interruptible.
|
||||||
|
|
||||||
2001-04-25 Egor Duda <deo@logos-m.ru>
|
2001-04-25 Egor Duda <deo@logos-m.ru>
|
||||||
|
|
||||||
* cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
|
* cygwin.din: Export asctime_r, ctime_r, gmtime_r, localtime_r
|
||||||
|
|
|
@ -735,7 +735,7 @@ interrupt_on_return (sigthread *th, int sig, void *handler, struct sigaction& si
|
||||||
|
|
||||||
thestack.init (ebp); /* Initialize from the input CONTEXT */
|
thestack.init (ebp); /* Initialize from the input CONTEXT */
|
||||||
for (i = 0; i < 32 && thestack++ ; i++)
|
for (i = 0; i < 32 && thestack++ ; i++)
|
||||||
if (interruptible (thestack.sf.AddrReturn.Offset))
|
if (th->exception || interruptible (thestack.sf.AddrReturn.Offset))
|
||||||
{
|
{
|
||||||
DWORD *addr_retaddr = ((DWORD *)thestack.sf.AddrFrame.Offset) + 1;
|
DWORD *addr_retaddr = ((DWORD *)thestack.sf.AddrFrame.Offset) + 1;
|
||||||
if (*addr_retaddr == thestack.sf.AddrReturn.Offset)
|
if (*addr_retaddr == thestack.sf.AddrReturn.Offset)
|
||||||
|
|
|
@ -680,7 +680,7 @@ sig_send (_pinfo *p, int sig, DWORD ebp)
|
||||||
{
|
{
|
||||||
thiscatch = sigcatch_main;
|
thiscatch = sigcatch_main;
|
||||||
thiscomplete = sigcomplete_main;
|
thiscomplete = sigcomplete_main;
|
||||||
thisframe.set (mainthread, ebp);
|
thisframe.set (mainthread, ebp, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!(thiscatch = getsem (p, "sigcatch", 0, 0)))
|
else if (!(thiscatch = getsem (p, "sigcatch", 0, 0)))
|
||||||
|
|
|
@ -40,6 +40,7 @@ struct sigthread
|
||||||
DWORD frame;
|
DWORD frame;
|
||||||
CRITICAL_SECTION lock;
|
CRITICAL_SECTION lock;
|
||||||
LONG winapi_lock;
|
LONG winapi_lock;
|
||||||
|
BOOL exception;
|
||||||
bool get_winapi_lock (int test = 0);
|
bool get_winapi_lock (int test = 0);
|
||||||
void release_winapi_lock ();
|
void release_winapi_lock ();
|
||||||
void init (const char *s);
|
void init (const char *s);
|
||||||
|
@ -55,6 +56,7 @@ private:
|
||||||
{
|
{
|
||||||
EnterCriticalSection (&st->lock);
|
EnterCriticalSection (&st->lock);
|
||||||
st->frame = 0;
|
st->frame = 0;
|
||||||
|
st->exception = 0;
|
||||||
st->release_winapi_lock ();
|
st->release_winapi_lock ();
|
||||||
LeaveCriticalSection (&st->lock);
|
LeaveCriticalSection (&st->lock);
|
||||||
st = NULL;
|
st = NULL;
|
||||||
|
@ -62,11 +64,12 @@ private:
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set (sigthread &t, DWORD ebp)
|
void set (sigthread &t, DWORD ebp, bool is_exception = 0)
|
||||||
{
|
{
|
||||||
DWORD oframe = t.frame;
|
DWORD oframe = t.frame;
|
||||||
st = &t;
|
st = &t;
|
||||||
t.frame = ebp;
|
t.frame = ebp;
|
||||||
|
t.exception = is_exception;
|
||||||
if (!oframe)
|
if (!oframe)
|
||||||
t.get_winapi_lock ();
|
t.get_winapi_lock ();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue