From: rehn@informatik.tu-muenchen.de
To: ultralinux@vger.kernel.org
Subject: Address that caused sigsegv
Date: Wed, 14 Apr 1999 09:14:09 +0000 [thread overview]
Message-ID: <marc-linux-ultrasparc-92408170123936@msgid-missing> (raw)
I am wrtiting a signal handler to catch SIGSEGVs.
In the handler I want to know which address caused the segmentation fault.
Could anyone tell me, where this information is on the stack frame?
In arch/sparc64/kernel/signal32.c I found the functions new_setup_frame32(),
setup_frame32() and setup_rt_frame32().
When I cause a SIGSEGV, handle_signal32() is called:
static inline void handle_signal32(...)
{
...
if (ka->sa.sa_flags & SA_SIGINFO)
setup_rt_frame32(ka, regs, signr, oldset, info);
else if (current->tss.new_signal)
new_setup_frame32(ka, regs, signr, oldset);
else
setup_frame32(&ka->sa, regs->tpc, regs->tnpc, regs, signr, oldset);
...
}
setup_rt_frame32() is called if SA_SIGINFO is set in sa_flags but the manpage
for sigaction says nothing about SA_SIGINFO under Linux (but under Solaris).
current->tss.new_signal is always not equal to zero so I think
new_setup_frame32() is always called.
* Is it impossible to get the address that caused the SIGSEGV or does
new_setup_frame32() write this information to the stack frame?
* What about SA_SIGINFO, is it obsolete or not implemented yet?
* Why does tss.new_signal exist, is setup_frame32() obsolete?
Christian
--
*******************************************************************************
Dipl. Inform. Christian Rehn
phone/fax: +49 +89 - 289 - {25408 / 22037}
email: rehn@in.tum.de
www: http://wwwspies.informatik.tu-muenchen.de/personen/rehn
smail: Technische Universitaet Muenchen, Informatik - H7, D-80290 Muenchen
visit: Luisenstrasse, Eingang XI, Zimmer 3558, D-80333 Muenchen
*******************************************************************************
next reply other threads:[~1999-04-14 9:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-14 9:14 rehn [this message]
1999-04-14 10:13 ` Address that caused sigsegv Michiel Boland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ultrasparc-92408170123936@msgid-missing \
--to=rehn@informatik.tu-muenchen.de \
--cc=ultralinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.