Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch V2, testsuite] gdb.base/savedregs.exp: SIGSEGV -> SIGALRM
Date: Mon, 20 Jun 2011 08:26:00 -0000	[thread overview]
Message-ID: <4DFF0418.6060706@codesourcery.com> (raw)
In-Reply-To: <201106200701.p5K71m5h030689@glazunov.sibelius.xs4all.nl>

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 (齐尧)


  reply	other threads:[~2011-06-20  8:26 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 [this message]
2011-06-20 11:12           ` Mark Kettenis
2011-06-20 15:07             ` Yao Qi
2011-06-20 15:14               ` Paul Koning

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=4DFF0418.6060706@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    /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