From: Paul Koning <paul_koning@dell.com>
To: Yao Qi <yao@codesourcery.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, <gdb-patches@sourceware.org>
Subject: Re: [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM
Date: Mon, 20 Jun 2011 15:14:00 -0000 [thread overview]
Message-ID: <B37AAD4C-DCC0-45E7-8833-8522D66624F2@dell.com> (raw)
In-Reply-To: <4DFF6239.9090203@codesourcery.com>
On Jun 20, 2011, at 11:07 AM, Yao Qi wrote:
> On 06/20/2011 07:10 PM, Mark Kettenis wrote:
>> My concern with using SIGILL (apart from generating an instruction
>> that forces SIGALL on all architectures we support) is that you're
>> going to end up testing a different unwinder as well. Typically in
>> the SIGSEGV case you'll end up at the faulting instruction, which is
>> defenitely in the function body, where we should be using the DWARF
>> CFI unwinder. But for SIGILL you could end up at the instruction
>> after the trapping instruction, which is likely to be in the function
>> epilogue which may be handled by an epilogue unwinder.
>
> Oh, I don't know PC could be the next instruction of that illegal
> instruction. At least, some years ago, when I was working on PowerPC,
> PC still points to the illegal instruction when SIGILL is triggered.
Same for MIPS.
More in general, where the PC points for any given exception is very much an architecture dependent question. On some architectures, PC points to the next instruction in a SEGV. On some architecture, PC points to the next instruction on SIGILL. Some architectures have imprecise exceptions where any number of these have a PC pointing somewhere in the vicinity (usually) of the offending instruction, but not a single well-known distance from it.
paul
prev parent reply other threads:[~2011-06-20 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-09 9:28 [patch, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGILL Yao Qi
2011-06-09 10:08 ` Andreas Schwab
2011-06-09 10:53 ` Yao Qi
2011-06-09 11:19 ` Mark Kettenis
2011-06-09 11:41 ` Pedro Alves
2011-06-09 13:25 ` Yao Qi
2011-06-09 13:10 ` Yao Qi
2011-06-09 14:25 ` Pedro Alves
2011-06-20 4:13 ` [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM Yao Qi
2011-06-20 7:03 ` Mark Kettenis
2011-06-20 8:26 ` Yao Qi
2011-06-20 11:12 ` Mark Kettenis
2011-06-20 15:07 ` Yao Qi
2011-06-20 15:14 ` Paul Koning [this message]
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=B37AAD4C-DCC0-45E7-8833-8522D66624F2@dell.com \
--to=paul_koning@dell.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
--cc=yao@codesourcery.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox