* [PATCH] PPC Call-clobbered registers testcase
@ 2007-09-24 14:41 Luis Machado
2007-09-25 16:21 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-09-24 14:41 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
Hi,
Accompaining the patch the deals with call-clobbered registers on PPC,
follows the testcase to make sure it's being handled correctly.
Suggestions and improvements are welcome.
:ADDPATCH ppc-testcase:
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
[-- Attachment #2: clobbered-registers-testcase.diff --]
[-- Type: text/x-patch, Size: 3100 bytes --]
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.
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))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
Index: gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.exp 2007-09-24 07:26:39.000000000 -0700
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should now show incorrect values.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc64-*"] then {
+ verbose "Skipping powerpc64 call clobbered registers testing."
+ return
+}
+
+set testfile "ppc-clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set compile_flags "debug additional_flags=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "Couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 6.*" \
+ "Insert breakpoint at problematic function"
+
+gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \
+ "Run until problematic function"
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-09-24 14:41 [PATCH] PPC Call-clobbered registers testcase Luis Machado
@ 2007-09-25 16:21 ` Luis Machado
2007-10-06 16:12 ` Daniel Jacobowitz
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-09-25 16:21 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 379 bytes --]
Fixing typo...
On Mon, 2007-09-24 at 11:41 -0300, Luis Machado wrote:
> Hi,
>
> Accompaining the patch the deals with call-clobbered registers on PPC,
> follows the testcase to make sure it's being handled correctly.
> Suggestions and improvements are welcome.
>
> :ADDPATCH ppc-testcase:
>
>
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
[-- Attachment #2: clobbered-registers-testcase.diff --]
[-- Type: text/x-patch, Size: 3100 bytes --]
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.
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))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
Index: gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.trace/ppc-clobbered-registers-O2.exp 2007-09-24 07:26:39.000000000 -0700
@@ -0,0 +1,61 @@
+# Copyright 2006 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should not show incorrect values.
+
+set prms_id 0
+set bug_id 0
+
+if ![istarget "powerpc64-*"] then {
+ verbose "Skipping powerpc64 call clobbered registers testing."
+ return
+}
+
+set testfile "ppc-clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set compile_flags "debug additional_flags=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {
+ unsupported "Testcase compile failed."
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "Couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 6.*" \
+ "Insert breakpoint at problematic function"
+
+gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \
+ "Run until problematic function"
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-09-25 16:21 ` Luis Machado
@ 2007-10-06 16:12 ` Daniel Jacobowitz
2007-10-08 18:55 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-10-06 16:12 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-06 16:12 ` Daniel Jacobowitz
@ 2007-10-08 18:55 ` Luis Machado
2007-10-08 19:06 ` Daniel Jacobowitz
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-10-08 18:55 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 2544 bytes --]
Thanks for reviewing,
Hopefully i addressed all of the issues in this updated version. I'm
aiming at gdb.opt for this one.
- Addressed the directory structure in the Changelog
- Not PowerPC-specific anymore
- Copyrighted c file
- Optimize compile flag
- Defined __attribute__(x)
As for the last comment, about passing on correct values, the correct
behaviour, at least in this test case, is for GDB to display those
values as optimized since they no longer are proven to be correct.
Anything i'm failing to see in this case?
Regards,
On Sat, 2007-10-06 at 12:12 -0400, Daniel Jacobowitz wrote:
> 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.
>
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
[-- Attachment #2: clobbered-registers-testcase.diff --]
[-- Type: text/x-patch, Size: 3863 bytes --]
2007-10-08 Luis Machado <luisgpm@br.ibm.com>
* gdb.opt/clobbered-registers-O2.c: New testcase source file.
* gdb.opt/clobbered-registers-O2.exp: New testcase expect file.
Index: gdb/testsuite/gdb.opt/clobbered-registers-O2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.opt/clobbered-registers-O2.c 2007-10-08 09:36:28.000000000 -0700
@@ -0,0 +1,44 @@
+/* This file is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif
+
+unsigned * __attribute__((noinline))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
Index: gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.opt/clobbered-registers-O2.exp 2007-10-08 11:20:17.000000000 -0700
@@ -0,0 +1,56 @@
+# Copyright 2007 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries for ppc.
+# GDB should not show incorrect values.
+
+set prms_id 0
+set bug_id 0
+
+set testfile "clobbered-registers-O2"
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+set compile_flags "debug optimize=-O2"
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ${compile_flags}] != "" } {
+ untested clobbered-registers-O2.exp
+ return -1
+}
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if ![runto_main] then {
+ perror "Couldn't run to breakpoint"
+ continue
+}
+
+gdb_test "b start_sequence" ".*Breakpoint 2 at.*line 29.*" \
+ "Insert breakpoint at problematic function"
+
+gdb_test continue ".*Breakpoint 2.*in start_sequence.*" \
+ "Run until problematic function"
+
+gdb_test backtrace ".*operand0=<value optimized out>.*operand1=<value optimized out>.*" \
+ "Check value of call clobbered registers"
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-08 18:55 ` Luis Machado
@ 2007-10-08 19:06 ` Daniel Jacobowitz
2007-10-08 19:14 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-10-08 19:06 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On Mon, Oct 08, 2007 at 03:45:40PM -0300, Luis Machado wrote:
> Thanks for reviewing,
>
> Hopefully i addressed all of the issues in this updated version. I'm
> aiming at gdb.opt for this one.
I think this won't work without a bit of extra work to add the new
directory, e.g. during configure. But I can take care of that.
> As for the last comment, about passing on correct values, the correct
> behaviour, at least in this test case, is for GDB to display those
> values as optimized since they no longer are proven to be correct.
> Anything i'm failing to see in this case?
Yes. If the test runs on x86, they may not be in registers - so they
may still be known, if they were stored on the stack.
Other than that, the testcase looks fine to me.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-08 19:06 ` Daniel Jacobowitz
@ 2007-10-08 19:14 ` Luis Machado
2007-10-08 19:35 ` Daniel Jacobowitz
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-10-08 19:14 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
> I think this won't work without a bit of extra work to add the new
> directory, e.g. during configure. But I can take care of that.
> Yes. If the test runs on x86, they may not be in registers - so they
> may still be known, if they were stored on the stack.
It makes sense. I'll re-work this bit then. While at it i might go for
the configure script changes as well.
Regards,
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-08 19:14 ` Luis Machado
@ 2007-10-08 19:35 ` Daniel Jacobowitz
2007-10-23 22:18 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-10-08 19:35 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On Mon, Oct 08, 2007 at 04:06:39PM -0300, Luis Machado wrote:
> > I think this won't work without a bit of extra work to add the new
> > directory, e.g. during configure. But I can take care of that.
>
> > Yes. If the test runs on x86, they may not be in registers - so they
> > may still be known, if they were stored on the stack.
>
> It makes sense. I'll re-work this bit then. While at it i might go for
> the configure script changes as well.
Thanks. If you want to take care of that, just look at Pierre's patch
for gdb.pascal.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-08 19:35 ` Daniel Jacobowitz
@ 2007-10-23 22:18 ` Luis Machado
2007-10-24 21:00 ` Daniel Jacobowitz
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-10-23 22:18 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Hi,
I've modified the patch to reflect the behaviour on x86 systems. On x86
it shows the values, but they're incorrectly shown as being equal, and
they shouldn't be.
On ppc they're expected to be "optmized out".
This patch includes a new directory, "gdb.opt", for testing optimized
binaries.
Does this look OK?
Regards,
On Mon, 2007-10-08 at 15:14 -0400, Daniel Jacobowitz wrote:
> On Mon, Oct 08, 2007 at 04:06:39PM -0300, Luis Machado wrote:
> > > I think this won't work without a bit of extra work to add the new
> > > directory, e.g. during configure. But I can take care of that.
> >
> > > Yes. If the test runs on x86, they may not be in registers - so they
> > > may still be known, if they were stored on the stack.
> >
> > It makes sense. I'll re-work this bit then. While at it i might go for
> > the configure script changes as well.
>
> Thanks. If you want to take care of that, just look at Pierre's patch
> for gdb.pascal.
>
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
[-- Attachment #2: clobbered-registers-testcase.diff --]
[-- Type: text/x-patch, Size: 9488 bytes --]
2007-10-23 Luis Machado <luisgpm@br.ibm.com>
* gdb.opt/clobbered-registers-O2.c: New testcase source file.
* gdb.opt/clobbered-registers-O2.exp: New testcase expect file.
* gdb.opt/Makefile.in: New makefile
* Makefile.in: Create new directory "gdb.opt"
* configure.ac: Add "gdb.opt" directory
* configure: Add "gdb.opt" directory
Index: gdb/testsuite/gdb.opt/clobbered-registers-O2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.opt/clobbered-registers-O2.c 2007-10-22 05:23:18.000000000 -0700
@@ -0,0 +1,44 @@
+/* This file is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Please email any bugs, comments, and/or additions to this file to:
+ bug-gdb@prep.ai.mit.edu */
+
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif
+
+unsigned * __attribute__((noinline))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
Index: gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.opt/clobbered-registers-O2.exp 2007-10-23 12:50:14.000000000 -0700
@@ -0,0 +1,113 @@
+# Copyright 2007 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries.
+# GDB should not show incorrect values.
+
+set testfile clobbered-registers-O2
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# What compiler are we using?
+#
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug optimize=-O2 nowarnings]] != "" } {
+ untested clobbered-registers-O2.exp
+ return -1
+}
+
+# use this to debug:
+#log_user 1
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { ![runto start_sequence] } then {
+ fail "run to start_sequence"
+ return
+}
+
+send_gdb "frame 1\n"
+
+gdb_expect 10 {
+ -re "#1.*in gen_movsd.*" { pass "frame 1 backtrace" }
+ default { fail "frame 1 backtrace error" }
+}
+
+set operand0 0
+set operand1 0
+send_gdb "p operand0\n"
+
+gdb_expect 5 {
+ -re "\\$\[0-9\]* = <(.*)>.*$gdb_prompt $" {
+ set operand0 "optimized"
+ }
+
+ -re "\\$\[0-9\]* = \\(unsigned int \*.*0x(.*)\[ \]*$gdb_prompt $" {
+ set operand0 $expect_out(1,string)
+ }
+
+ default {
+ fail "Operand0 doesn't have expected values"
+ }
+}
+
+send_gdb "p operand1\n"
+
+gdb_expect 5 {
+ -re "\\$\[0-9\]* = <(.*)>.*$gdb_prompt $" {
+ set operand1 "optimized"
+ }
+
+ -re "\\$\[0-9\]* = \\(unsigned int \*.*0x(.*)\[ \]*$gdb_prompt $" {
+ set operand1 $expect_out(1,string)
+ }
+
+ default {
+ fail "Operand1 doesn't have expected values"
+ }
+}
+
+set result1 [string compare $operand0 "optimized"]
+set result2 [string compare $operand1 "optimized"]
+
+# The PowerPC test ends here. If both values are optimized, then
+# we are fine with it.
+if {!$result1 && !$result2} {
+ pass "Both values were optimized"
+ return
+}
+
+# This is a x86-specific test since it doesn't show the values
+# as optimized, but they appear as equal values. That is
+# incorrect.
+set result1 [string compare $operand0 $operand1]
+
+if {!$result1} {
+ fail "Values are displayed but are incorrect"
+ return -1
+}
Index: gdb/testsuite/Makefile.in
===================================================================
--- gdb.orig/testsuite/Makefile.in 2007-10-22 05:00:22.000000000 -0700
+++ gdb/testsuite/Makefile.in 2007-10-22 05:00:26.000000000 -0700
@@ -37,7 +37,8 @@
ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
gdb.dwarf2 \
gdb.fortran gdb.server gdb.java gdb.mi \
- gdb.objc gdb.pascal gdb.threads gdb.trace gdb.xml \
+ gdb.objc gdb.opt gdb.pascal gdb.threads gdb.trace \
+ gdb.xml \
$(SUBDIRS)
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
Index: gdb/testsuite/configure.ac
===================================================================
--- gdb.orig/testsuite/configure.ac 2007-10-22 05:00:22.000000000 -0700
+++ gdb/testsuite/configure.ac 2007-10-22 05:00:26.000000000 -0700
@@ -116,5 +116,5 @@
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
gdb.fortran/Makefile gdb.server/Makefile \
gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile \
- gdb.objc/Makefile gdb.pascal/Makefile gdb.threads/Makefile \
- gdb.trace/Makefile gdb.xml/Makefile])
+ gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
+ gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
Index: gdb/testsuite/gdb.opt/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ gdb/testsuite/gdb.opt/Makefile.in 2007-10-22 05:00:26.000000000 -0700
@@ -0,0 +1,24 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = hello/hello
+
+MISCELLANEOUS =
+
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
+
+clean mostlyclean:
+ -find . -name '*.o' -print | xargs rm -f
+ -find . -name '*.ali' -print | xargs rm -f
+ -find . -name 'b~*.ad[sb]' -print | xargs rm -f
+ -rm -f *~ a.out xgdb *.x *.ci *.tmp
+ -rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
+ -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
+ -rm -f $(MISCELLANEOUS) twice-tmp.c
+
+distclean maintainer-clean realclean: clean
+ -rm -f *~ core
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
Index: gdb/testsuite/configure
===================================================================
--- gdb.orig/testsuite/configure 2007-10-22 05:00:22.000000000 -0700
+++ gdb/testsuite/configure 2007-10-22 05:00:26.000000000 -0700
@@ -3104,7 +3104,7 @@
- ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.objc/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -3668,6 +3668,7 @@
"gdb.java/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.java/Makefile" ;;
"gdb.mi/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.mi/Makefile" ;;
"gdb.objc/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
+ "gdb.opt/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
"gdb.trace/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
"gdb.xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-23 22:18 ` Luis Machado
@ 2007-10-24 21:00 ` Daniel Jacobowitz
2007-10-25 19:06 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-10-24 21:00 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On Tue, Oct 23, 2007 at 08:05:57PM -0300, Luis Machado wrote:
> Hi,
>
> I've modified the patch to reflect the behaviour on x86 systems. On x86
> it shows the values, but they're incorrectly shown as being equal, and
> they shouldn't be.
>
> On ppc they're expected to be "optmized out".
>
> This patch includes a new directory, "gdb.opt", for testing optimized
> binaries.
>
> Does this look OK?
No, sorry, but you're going the right direction :-)
> 2007-10-23 Luis Machado <luisgpm@br.ibm.com>
>
> * gdb.opt/clobbered-registers-O2.c: New testcase source file.
> * gdb.opt/clobbered-registers-O2.exp: New testcase expect file.
> * gdb.opt/Makefile.in: New makefile
> * Makefile.in: Create new directory "gdb.opt"
> * configure.ac: Add "gdb.opt" directory
> * configure: Add "gdb.opt" directory
Periods at the end of entries. You should just say "Regenerated." for
things like the configure script.
> + Please email any bugs, comments, and/or additions to this file to:
> + bug-gdb@prep.ai.mit.edu */
It's not a big deal, but please don't add this to new files. I don't
think that address has worked in a decade or more. We should get
rid of it.
> +send_gdb "frame 1\n"
> +
> +gdb_expect 10 {
> + -re "#1.*in gen_movsd.*" { pass "frame 1 backtrace" }
> + default { fail "frame 1 backtrace error" }
> +}
Please avoid using send_gdb or gdb_expect, unless you have special
needs for them. If you have only one pass pattern, use gdb_test;
if you have more than one, use gdb_test_multiple. It works like
gdb_expect but includes the send_gdb and handles all sorts of
unexpected output for you.
> +gdb_expect 5 {
> + -re "\\$\[0-9\]* = <(.*)>.*$gdb_prompt $" {
> + set operand0 "optimized"
> + }
No need for the wildcare here. You can match <value optimized out> or
however that's spelled. Also, you need one more backslash on the
$; the two \\ become a backslash in the regular expression, but that
leaves the unescaped $ at risk of TCL variable expansion.
> +set result1 [string compare $operand0 "optimized"]
> +set result2 [string compare $operand1 "optimized"]
> +
> +# The PowerPC test ends here. If both values are optimized, then
> +# we are fine with it.
> +if {!$result1 && !$result2} {
> + pass "Both values were optimized"
> + return
> +}
> +
> +# This is a x86-specific test since it doesn't show the values
> +# as optimized, but they appear as equal values. That is
> +# incorrect.
> +set result1 [string compare $operand0 $operand1]
> +
> +if {!$result1} {
> + fail "Values are displayed but are incorrect"
> + return -1
> +}
Every test should be either pass or fail, and it should pass and fail
with the same message. We make an exception in the GDB testsuite, by
allowing (reason) after a failure message, but that's it.
This suggests a simpler formulation for your test. What are you
trying to avoid? Incorrect values. So <value optimized out> is a
pass, and 13 (or 14 for the second one) is a pass, and everything
else is a fail.
gdb_test "print operand0" \
"\\\$$decimal = (<value optimized out>|13)"
gdb_test "print operand1" \
"\\\$$decimal = (<value optimized out>|14)"
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-24 21:00 ` Daniel Jacobowitz
@ 2007-10-25 19:06 ` Luis Machado
2007-10-25 19:30 ` Daniel Jacobowitz
0 siblings, 1 reply; 12+ messages in thread
From: Luis Machado @ 2007-10-25 19:06 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
> Periods at the end of entries. You should just say "Regenerated." for
> things like the configure script.
Fixed
> It's not a big deal, but please don't add this to new files. I don't
> think that address has worked in a decade or more. We should get
> rid of it.
Fixed
> Please avoid using send_gdb or gdb_expect, unless you have special
> needs for them. If you have only one pass pattern, use gdb_test;
> if you have more than one, use gdb_test_multiple. It works like
> gdb_expect but includes the send_gdb and handles all sorts of
> unexpected output for you.
Done
Took a different path as you suggested. The synching is being done via
matching with the $gdb_prompt at the end of every test. This way it
works flawlessly on both x86 and ppc. Passes 3 tests on ppc and passes 2
and fails 1 on x86.
I've also moved the patch one level up in the tree to the testsuite
directory.
How does it look now?
Regards,
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
[-- Attachment #2: clobbered-registers-testcase.diff --]
[-- Type: text/x-patch, Size: 8418 bytes --]
2007-10-25 Luis Machado <luisgpm@br.ibm.com>
* gdb.opt/clobbered-registers-O2.c: New testcase source file.
* gdb.opt/clobbered-registers-O2.exp: New testcase expect file.
* gdb.opt/Makefile.in: New makefile.
* Makefile.in: Create new directory "gdb.opt".
* configure.ac: Add "gdb.opt" directory.
* configure: Regenerated.
Index: testsuite/gdb.opt/clobbered-registers-O2.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gdb.opt/clobbered-registers-O2.c 2007-10-25 11:44:11.000000000 -0700
@@ -0,0 +1,41 @@
+/* This file is part of GDB, the GNU debugger.
+
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef __GNUC__
+#define __attribute__(x)
+#endif
+
+unsigned * __attribute__((noinline))
+start_sequence (unsigned * x, unsigned * y)
+{
+ return (unsigned *)0xdeadbeef;
+};
+
+unsigned __attribute__((noinline))
+gen_movsd (unsigned * operand0, unsigned * operand1)
+{
+ return *start_sequence(operand0, operand1);
+}
+
+int main(void)
+{
+ unsigned x, y;
+
+ x = 13;
+ y = 14;
+ return (int)gen_movsd (&x, &y);
+}
Index: testsuite/gdb.opt/clobbered-registers-O2.exp
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gdb.opt/clobbered-registers-O2.exp 2007-10-25 11:47:57.000000000 -0700
@@ -0,0 +1,65 @@
+# Copyright 2007 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# This file is part of the gdb testsuite.
+
+if $tracelevel then {
+ strace $tracelevel
+}
+
+# Test displaying call clobbered registers in optimized binaries.
+# GDB should not show incorrect values.
+
+set testfile clobbered-registers-O2
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+
+# What compiler are we using?
+#
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug optimize=-O2 nowarnings]] != "" } {
+ untested clobbered-registers-O2.exp
+ return -1
+}
+
+# use this to debug:
+#log_user 1
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { ![runto start_sequence] } then {
+ fail "run to start_sequence"
+ return
+}
+
+gdb_test "frame 1" "#1.*in gen_movsd.*" "Backtracing"
+
+gdb_test_multiple "print operand0" "print operand0" {
+ -re "\\\$$decimal = <value optimized out>\r\n$gdb_prompt $" { pass "print operand0"}
+ -re "$hex\r\n$gdb_prompt $" { gdb_test "print *operand0" "13" "print operand0" }
+}
+
+gdb_test_multiple "print operand1" "print operand1" {
+ -re "\\\$$decimal = <value optimized out>\r\n$gdb_prompt" { pass "print operand1"}
+ -re "$hex\r\n$gdb_prompt $" { gdb_test "print *operand1" "14" "print operand1" }
+}
+
Index: testsuite/Makefile.in
===================================================================
--- testsuite.orig/Makefile.in 2007-10-25 11:35:47.000000000 -0700
+++ testsuite/Makefile.in 2007-10-25 11:41:46.000000000 -0700
@@ -37,7 +37,8 @@
ALL_SUBDIRS = gdb.ada gdb.arch gdb.asm gdb.base gdb.cp gdb.disasm \
gdb.dwarf2 \
gdb.fortran gdb.server gdb.java gdb.mi \
- gdb.objc gdb.pascal gdb.threads gdb.trace gdb.xml \
+ gdb.objc gdb.opt gdb.pascal gdb.threads gdb.trace \
+ gdb.xml \
$(SUBDIRS)
EXPECT = `if [ -f $${rootme}/../../expect/expect ] ; then \
Index: testsuite/configure.ac
===================================================================
--- testsuite.orig/configure.ac 2007-10-25 11:35:47.000000000 -0700
+++ testsuite/configure.ac 2007-10-25 11:41:46.000000000 -0700
@@ -116,5 +116,5 @@
gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile \
gdb.fortran/Makefile gdb.server/Makefile \
gdb.java/Makefile gdb.mi/Makefile gdb.modula2/Makefile \
- gdb.objc/Makefile gdb.pascal/Makefile gdb.threads/Makefile \
- gdb.trace/Makefile gdb.xml/Makefile])
+ gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile \
+ gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile])
Index: testsuite/gdb.opt/Makefile.in
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ testsuite/gdb.opt/Makefile.in 2007-10-25 11:41:46.000000000 -0700
@@ -0,0 +1,24 @@
+VPATH = @srcdir@
+srcdir = @srcdir@
+
+EXECUTABLES = hello/hello
+
+MISCELLANEOUS =
+
+all info install-info dvi install uninstall installcheck check:
+ @echo "Nothing to be done for $@..."
+
+clean mostlyclean:
+ -find . -name '*.o' -print | xargs rm -f
+ -find . -name '*.ali' -print | xargs rm -f
+ -find . -name 'b~*.ad[sb]' -print | xargs rm -f
+ -rm -f *~ a.out xgdb *.x *.ci *.tmp
+ -rm -f *~ *.o a.out xgdb *.x *.ci *.tmp
+ -rm -f core core.coremaker coremaker.core corefile $(EXECUTABLES)
+ -rm -f $(MISCELLANEOUS) twice-tmp.c
+
+distclean maintainer-clean realclean: clean
+ -rm -f *~ core
+ -rm -f Makefile config.status config.log
+ -rm -f *-init.exp
+ -rm -fr *.log summary detail *.plog *.sum *.psum site.*
Index: testsuite/configure
===================================================================
--- testsuite.orig/configure 2007-10-25 11:35:47.000000000 -0700
+++ testsuite/configure 2007-10-25 11:41:46.000000000 -0700
@@ -3104,7 +3104,7 @@
- ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.objc/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
+ ac_config_files="$ac_config_files Makefile gdb.ada/Makefile gdb.arch/Makefile gdb.asm/Makefile gdb.base/Makefile gdb.cp/Makefile gdb.disasm/Makefile gdb.dwarf2/Makefile gdb.fortran/Makefile gdb.server/Makefile gdb.java/Makefile gdb.mi/Makefile gdb.objc/Makefile gdb.opt/Makefile gdb.pascal/Makefile gdb.threads/Makefile gdb.trace/Makefile gdb.xml/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -3668,6 +3668,7 @@
"gdb.java/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.java/Makefile" ;;
"gdb.mi/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.mi/Makefile" ;;
"gdb.objc/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.objc/Makefile" ;;
+ "gdb.opt/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.opt/Makefile" ;;
"gdb.threads/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.threads/Makefile" ;;
"gdb.trace/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.trace/Makefile" ;;
"gdb.xml/Makefile" ) CONFIG_FILES="$CONFIG_FILES gdb.xml/Makefile" ;;
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-25 19:06 ` Luis Machado
@ 2007-10-25 19:30 ` Daniel Jacobowitz
2007-10-25 20:36 ` Luis Machado
0 siblings, 1 reply; 12+ messages in thread
From: Daniel Jacobowitz @ 2007-10-25 19:30 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On Thu, Oct 25, 2007 at 04:05:27PM -0300, Luis Machado wrote:
> Took a different path as you suggested. The synching is being done via
> matching with the $gdb_prompt at the end of every test. This way it
> works flawlessly on both x86 and ppc. Passes 3 tests on ppc and passes 2
> and fails 1 on x86.
What fails on x86? Well, I can look at it after it's in.
This is the right way to sync.
> + -re "\\\$$decimal = <value optimized out>\r\n$gdb_prompt" { pass "print operand1"}
"$gdb_prompt $" there please. Ok to commit otherwise.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] PPC Call-clobbered registers testcase
2007-10-25 19:30 ` Daniel Jacobowitz
@ 2007-10-25 20:36 ` Luis Machado
0 siblings, 0 replies; 12+ messages in thread
From: Luis Machado @ 2007-10-25 20:36 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches
On Thu, 2007-10-25 at 15:23 -0400, Daniel Jacobowitz wrote:
> On Thu, Oct 25, 2007 at 04:05:27PM -0300, Luis Machado wrote:
> > Took a different path as you suggested. The synching is being done via
> > matching with the $gdb_prompt at the end of every test. This way it
> > works flawlessly on both x86 and ppc. Passes 3 tests on ppc and passes 2
> > and fails 1 on x86.
>
> What fails on x86? Well, I can look at it after it's in.
>
> This is the right way to sync.
> > + -re "\\\$$decimal = <value optimized out>\r\n$gdb_prompt" { pass "print operand1"}
>
> "$gdb_prompt $" there please. Ok to commit otherwise.
>
Thanks, i've checked this in.
--
Luis Machado
IBM Linux Technology Center
e-mail: luisgpm@linux.vnet.ibm.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2007-10-25 20:32 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24 14:41 [PATCH] PPC Call-clobbered registers testcase Luis Machado
2007-09-25 16:21 ` Luis Machado
2007-10-06 16:12 ` Daniel Jacobowitz
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox