Re: [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM

Yao Qi
2011-06-20T08:26:23Z

On 06/20/2011 03:01 PM, Mark Kettenis wrote:
> That's an even bigger change. And I don't think that SIGALRM is even
> guaranteed to happen before the program terminates. And if there
> MMU-less systems that effectively don't support SIGSEGV, there
> certainly are timer-less systems that don't support SIGALRM.
>

What system doesn't support SIGALRM? I noticed that SIGALRM is widely
used in gdb testsuite, so I assume that it is safer to use SIGALRM than
SIGILL here.

> Really, just skip this test on MMU-less systems. If you're worried
> about test coverage on your MMU-less ARM systems, add an additional
> test in gdb.arch/ that uses an undefined instruction to generate
> SIGILL.

I am afraid it is not a good idea. There are many MMU-less processor,
and shall we duplicate this test case all over under gdb.arch/ for each
MMU-less processor?

As I pointed out before, this test case has nothing to do with the
difference of MMU system and MMU-less system. Originally, SIGSEGV was
used here to trigger an invocation to signal handler. The key point of
this case is "to trigger an invocation to a handler, and check the frame
in signal handler", so handler of what signal doesn't matter here.
Then, we should choose a signal which exists on all systems that gdb
supports. Firstly, SIGSEGV is chosen, but it doesn't work on MMU-less
system, then SIGILL and SIGALRM is proposed in my two patches
respectively, which you don't like.

Maybe, another option is to define invalid instruction for each targets
in test case.

--
Yao (é½å°§)