This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGILL
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: yao at codesourcery dot com
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 9 Jun 2011 13:17:27 +0200 (CEST)
- Subject: Re: [patch, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGILL
- References: <4DF09229.4070704@codesourcery.com>
> Date: Thu, 09 Jun 2011 17:28:09 +0800
> From: Yao Qi <yao@codesourcery.com>
>
> In current gdb.base/savedregs.exp, signal handler is installed for
> signal SIGSEGV, and SIGSEGV is trigger by `*(char *)0 = 0;'. However,
> on non-mmu uclinux system, writing to an address 0x0 doesn't trigger
> SIGSEGV.
>
> In my patch, SIGILL is chosen to replace SIGSEGV. One assumption here
> is that 0xffff is an invalid instruction on all ports.
Please don't do this. You're changing the test significantly. And
there is no guarantee that 0xffff is an invalid instruction. Heck
most platforms don't even have 16-bit instructions.