Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Luis Machado <luisgpm@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] PPC Call-clobbered registers testcase
Date: Sat, 06 Oct 2007 16:12:00 -0000	[thread overview]
Message-ID: <20071006161230.GA10179@caradoc.them.org> (raw)
In-Reply-To: <1190726512.4376.0.camel@localhost>

Thanks for doing this.

On Tue, Sep 25, 2007 at 10:21:51AM -0300, Luis Machado wrote:
> 2007-09-24  Luis Machado  <luisgpm@br.ibm.com>
> 
>     * ppc-clobbered-registers-O2.c: New testcase source file.
>     * ppc-clobbered-registers-O2.exp: New testcase expect file.

The directory name should be included here.  Also, gdb.trace doesn't
mean what you think it does :-)  It's for tracepoint tests; so instead
you probably want gdb.base.

Alternatively, a new gdb.opt for optimized code tests.  CodeSourcery
has a project I hope we will be contributing by the beginning of next
year that puts a few testcases in gdb.opt; if no one thinks that's a
bad idea, then let's start the directory now.

There's nothing PowerPC specific about these tests.  So I would
recommend not putting ppc in their names or skipping them for
non-PowerPC targets.  It will turn up the same bug on other platforms
that passed arguments in registers, hopefully.

> Index: gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.c
> ===================================================================
> --- /dev/null	1970-01-01 00:00:00.000000000 +0000
> +++ gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.c	2007-09-24 07:26:39.000000000 -0700
> @@ -0,0 +1,21 @@
> +
> +unsigned * __attribute__((noinline))

New test cases should have a copyright header, please.  And let's use

#ifndef __GNUC__
#define __attribute__(x)
#endif

so that non-GNU compilers can have a chance to run the test too.  At
least in theory.

> +set compile_flags "debug additional_flags=-O2"

"debug optimize=-O2"

> +gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
> +  "Check value of call clobbered registers"

May as well let the test pass if it sees the correct values, too.

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2007-10-06 16:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 14:41 Luis Machado
2007-09-25 16:21 ` Luis Machado
2007-10-06 16:12   ` Daniel Jacobowitz [this message]
2007-10-08 18:55     ` Luis Machado
2007-10-08 19:06       ` Daniel Jacobowitz
2007-10-08 19:14         ` Luis Machado
2007-10-08 19:35           ` Daniel Jacobowitz
2007-10-23 22:18             ` Luis Machado
2007-10-24 21:00               ` Daniel Jacobowitz
2007-10-25 19:06                 ` Luis Machado
2007-10-25 19:30                   ` Daniel Jacobowitz
2007-10-25 20:36                     ` Luis Machado

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=20071006161230.GA10179@caradoc.them.org \
    --to=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=luisgpm@linux.vnet.ibm.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