Hi Yuri,

On Sat, Oct 11, 2008 at 05:41:09PM -0700, Yuri wrote:
> Is there a way to access from signal handler CPU registers as they
> were before signal, modify some of them, clear the signal and
> continue from the instruction that caused SEGV initially?

Maybe you can have a look to the development version of the
Enlightenment window manager [1]. It catches segfaults and displayed a
window to ask the user what to do (continue, abort).  I experienced a
few crashes where this helpful window was triggered a dozen times, I
asked the window manager to continue and could save my work before
everything crashed.

First moves in the svn repository [2] (basically grep SEGV):
| ./src/bin/e_exec.c:456:       else if (cfdata->event.exit_signal == SIGSEGV)
| ./src/bin/e_desklock.c:689:   sigaction(SIGSEGV, &action, NULL);
| ./src/bin/e_object.c:153:     sigaction(SIGSEGV, &act, &oact);
| ./src/bin/e_object.c:158:          sigaction(SIGSEGV, &oact, NULL);
| ./src/bin/e_object.c:168:          sigaction(SIGSEGV, &oact, NULL);
| ./src/bin/e_signals.c:28:   e_alert_show("This is very bad. Enlightenment 
SEGV'd.\n"
| ./src/bin/e_signals.c:48:   e_alert_show("This is very bad. Enlightenment 
SEGV'd.\n"
| ./src/bin/e_main.c:99:   sigaction(SIGSEGV, &action, NULL);
| ./src/bin/e_main.c:322:// FIXME: SEGV's on shutdown if fm2 windows up - 
disable for now.

Hope that helps!
Romain

References:
  1. http://enlightenment.org/
  2. http://svn.enlightenment.org/svn/e/trunk/e/

-- 
Romain Tartière <[EMAIL PROTECTED]>        http://romain.blogreen.org/
pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
(plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)

Attachment: pgpVxJ2QWDAt9.pgp
Description: PGP signature

Reply via email to