Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
@ 2006-11-11 18:40 Ulrich Weigand
  2006-11-22 14:16 ` [PING] " Ulrich Weigand
  2006-11-22 14:27 ` Daniel Jacobowitz
  0 siblings, 2 replies; 6+ messages in thread
From: Ulrich Weigand @ 2006-11-11 18:40 UTC (permalink / raw)
  To: gdb-patches

Hello,

this adds a couple of tweaks related to SPU to the testsuite.  In particular,
the following tests are disabled for the SPU:

gdb.base/attach.exp
 -- because the runtime library doesn't provide "sleep"

gdb.base/term.exp
 -- because we don't support command line arguments (by default)

gdb.cp/bs145503.exp
gdb.cp/exception.exp
gdb.cp/userdef.exp
 -- because the executables are too big to execute on the SPU
    (they pull in a lot of stuff from the libstdc++ library)

gdb.gdb/complaints.exp
gdb.gdb/selftest.exp
gdb.gdb/observer.exp
gdb.gdb/xfullpath.exp
 -- because the GDB executable is built for PowerPC and doesn't run on
    the SPU (even though GDB considers the Cell BE configuration to be
    'native')

OK?

Bye,
Ulrich


ChangeLog:

	* gdb.asm/asm-source.exp: Add "spu*-*-*" target.
	* gdb.asm/spu.inc: New file.
	* gdb.base/term.exp: Disable if [target_info exists noargs].
	* gdb.base/attach.exp: Disable on SPU target.
	* gdb.cp/bs145503.exp: Likewise.
	* gdb.cp/exception.exp: Likewise.
	* gdb.cp/userdef.exp: Likewise.
	* gdb.gdb/complaints.exp: Likewise.
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.

diff -urN gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp gdb-head/gdb/testsuite/gdb.asm/asm-source.exp
--- gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp	2006-08-10 07:27:20.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.asm/asm-source.exp	2006-10-30 18:27:29.165650016 +0100
@@ -120,6 +120,11 @@
         set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
 	set debug-flags "-gdwarf-2"
     }
+    "spu*-*-*" {
+       set asm-arch spu
+       set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir} --no-warn"
+       set debug-flags "-gdwarf-2"
+    }
     "xstormy16-*-*" {
         set asm-arch xstormy16
 	set debug-flags "-gdwarf-2"
diff -urN gdb-orig/gdb/testsuite/gdb.asm/spu.inc gdb-head/gdb/testsuite/gdb.asm/spu.inc
--- gdb-orig/gdb/testsuite/gdb.asm/spu.inc	1970-01-01 01:00:00.000000000 +0100
+++ gdb-head/gdb/testsuite/gdb.asm/spu.inc	2006-10-30 18:33:04.158718784 +0100
@@ -0,0 +1,42 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	stqd    $lr, 16($sp)
+	stqd    $sp, -32($sp)
+	ai      $sp, $sp, -32
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	ai	$sp, $sp, 32
+	lqd     $lr, 16($sp)
+	bi	$lr	
+	.endm
+
+	.macro gdbasm_call subr
+	brsl	$lr, \subr
+	.endm
+
+	.macro gdbasm_several_nops
+	nop
+	nop
+	nop
+	nop
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	stop	0x2000
+	stop 
+	stop 
+	stop 
+	.endm
+
+	comment "startup"
+	.macro gdbasm_startup
+	il	$0, 0
+	ila	$sp, 16368
+	stqd	$0, 0($sp)
+	stqd	$sp, -32($sp)
+	ai	$sp, $sp, -32
+	stqd	$0, 16($sp)
+	.endm
diff -urN gdb-orig/gdb/testsuite/gdb.base/attach.exp gdb-head/gdb/testsuite/gdb.base/attach.exp
--- gdb-orig/gdb/testsuite/gdb.base/attach.exp	2006-08-10 07:27:20.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.base/attach.exp	2006-10-30 19:51:29.375733552 +0100
@@ -32,6 +32,11 @@
     return 0
 }
 
+# On SPU, this test currently fails because "sleep" is not supported.
+if { [istarget "spu*-*-*"] } {
+	return 0
+}
+
 # are we on a target board
 if [is_remote target] then {
     return 0
diff -urN gdb-orig/gdb/testsuite/gdb.base/term.exp gdb-head/gdb/testsuite/gdb.base/term.exp
--- gdb-orig/gdb/testsuite/gdb.base/term.exp	2006-08-10 07:27:20.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.base/term.exp	2006-10-30 18:27:29.226640744 +0100
@@ -29,6 +29,11 @@
     continue
 }
 
+if [target_info exists noargs] then {
+    verbose "Skipping term.exp because of noargs."
+    return
+}
+
 gdb_start
 
 #
diff -urN gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp gdb-head/gdb/testsuite/gdb.cp/bs15503.exp
--- gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp	2006-07-21 00:50:07.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.cp/bs15503.exp	2006-10-30 18:35:15.038661024 +0100
@@ -24,6 +24,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "bs15503"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/exception.exp gdb-head/gdb/testsuite/gdb.cp/exception.exp
--- gdb-orig/gdb/testsuite/gdb.cp/exception.exp	2006-08-10 07:27:20.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.cp/exception.exp	2006-10-30 18:35:35.802701088 +0100
@@ -44,6 +44,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "exception"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/userdef.exp gdb-head/gdb/testsuite/gdb.cp/userdef.exp
--- gdb-orig/gdb/testsuite/gdb.cp/userdef.exp	2006-08-10 07:27:20.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.cp/userdef.exp	2006-10-30 18:36:02.853716896 +0100
@@ -27,6 +27,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "userdef"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp gdb-head/gdb/testsuite/gdb.gdb/complaints.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp	2004-09-10 03:04:59.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.gdb/complaints.exp	2006-10-30 19:54:59.650725952 +0100
@@ -31,6 +31,11 @@
     return
 }
 
+# SPU 'pseudo-native' is not really native and cannot run the host GDB.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 proc setup_test { executable } {
     global gdb_prompt
     global timeout
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/observer.exp gdb-head/gdb/testsuite/gdb.gdb/observer.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/observer.exp	2004-09-10 03:04:59.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.gdb/observer.exp	2006-10-30 19:55:10.025613624 +0100
@@ -29,6 +29,11 @@
     return
 }
 
+# SPU 'pseudo-native' is not really native and cannot run the host GDB.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 proc setup_test { executable } {
     global gdb_prompt
     global timeout
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-head/gdb/testsuite/gdb.gdb/selftest.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp	2005-12-26 15:38:20.000000000 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/selftest.exp	2006-10-30 19:55:21.454740544 +0100
@@ -29,6 +29,11 @@
     return
 }
 
+# SPU 'pseudo-native' is not really native and cannot run the host GDB.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 # Not all of the lines of code near the start of main are executed for
 # every machine.  Also, optimization may reorder some of the lines.
 # So all we do is try to step or next over everything until we get
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp	2004-09-10 03:04:59.000000000 +0200
+++ gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp	2006-10-30 19:55:33.588626152 +0100
@@ -30,6 +30,11 @@
     return
 }
 
+# SPU 'pseudo-native' is not really native and cannot run the host GDB.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 proc setup_test { executable } {
     global gdb_prompt
     global timeout
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PING] Re: [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
  2006-11-11 18:40 [RFA][5/5] New port: Cell BE SPU (testsuite tweaks) Ulrich Weigand
@ 2006-11-22 14:16 ` Ulrich Weigand
  2006-11-22 14:27 ` Daniel Jacobowitz
  1 sibling, 0 replies; 6+ messages in thread
From: Ulrich Weigand @ 2006-11-22 14:16 UTC (permalink / raw)
  To: gdb-patches


http://sources.redhat.com/ml/gdb-patches/2006-11/msg00086.html

> 	* gdb.asm/asm-source.exp: Add "spu*-*-*" target.
> 	* gdb.asm/spu.inc: New file.
> 	* gdb.base/term.exp: Disable if [target_info exists noargs].
> 	* gdb.base/attach.exp: Disable on SPU target.
> 	* gdb.cp/bs145503.exp: Likewise.
> 	* gdb.cp/exception.exp: Likewise.
> 	* gdb.cp/userdef.exp: Likewise.
> 	* gdb.gdb/complaints.exp: Likewise.
> 	* gdb.gdb/selftest.exp: Likewise.
> 	* gdb.gdb/observer.exp: Likewise.
> 	* gdb.gdb/xfullpath.exp: Likewise.

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
  2006-11-11 18:40 [RFA][5/5] New port: Cell BE SPU (testsuite tweaks) Ulrich Weigand
  2006-11-22 14:16 ` [PING] " Ulrich Weigand
@ 2006-11-22 14:27 ` Daniel Jacobowitz
  2006-11-22 14:54   ` Ulrich Weigand
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-11-22 14:27 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On Sat, Nov 11, 2006 at 07:40:16PM +0100, Ulrich Weigand wrote:
> Hello,
> 
> this adds a couple of tweaks related to SPU to the testsuite.  In particular,
> the following tests are disabled for the SPU:
> 
> gdb.base/attach.exp
>  -- because the runtime library doesn't provide "sleep"
> 
> gdb.base/term.exp
>  -- because we don't support command line arguments (by default)
> 
> gdb.cp/bs145503.exp
> gdb.cp/exception.exp
> gdb.cp/userdef.exp
>  -- because the executables are too big to execute on the SPU
>     (they pull in a lot of stuff from the libstdc++ library)
> 
> gdb.gdb/complaints.exp
> gdb.gdb/selftest.exp
> gdb.gdb/observer.exp
> gdb.gdb/xfullpath.exp
>  -- because the GDB executable is built for PowerPC and doesn't run on
>     the SPU (even though GDB considers the Cell BE configuration to be
>     'native')
> 
> OK?

How much of this still applies, now that you're building GDB using a
cross configuration triplet?  I would imagine isnative now fails.


-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
  2006-11-22 14:27 ` Daniel Jacobowitz
@ 2006-11-22 14:54   ` Ulrich Weigand
  2006-11-22 16:11     ` Daniel Jacobowitz
  0 siblings, 1 reply; 6+ messages in thread
From: Ulrich Weigand @ 2006-11-22 14:54 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz wrote:

> How much of this still applies, now that you're building GDB using a
> cross configuration triplet?  I would imagine isnative now fails.

They all still apply.  However, you've got a point with isnative --
the gdb.gdb testcases don't currently use it however.  Maybe they
should?  The following patch works as well as the original ...

Bye,
Ulrich


ChangeLog:

	* gdb.asm/asm-source.exp: Add "spu*-*-*" target.
	* gdb.asm/spu.inc: New file.
	* gdb.base/term.exp: Disable if [target_info exists noargs].
	* gdb.gdb/complaints.exp: Disable if ![isnative].
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.
	* gdb.base/attach.exp: Disable on SPU target.
	* gdb.cp/bs145503.exp: Likewise.
	* gdb.cp/exception.exp: Likewise.
	* gdb.cp/userdef.exp: Likewise.

diff -urN gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp gdb-head/gdb/testsuite/gdb.asm/asm-source.exp
--- gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp	2006-11-22 15:37:06.945107824 +0100
+++ gdb-head/gdb/testsuite/gdb.asm/asm-source.exp	2006-11-22 15:34:19.425149536 +0100
@@ -120,6 +120,11 @@
         set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
 	set debug-flags "-gdwarf-2"
     }
+    "spu*-*-*" {
+       set asm-arch spu
+       set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir} --no-warn"
+       set debug-flags "-gdwarf-2"
+    }
     "xstormy16-*-*" {
         set asm-arch xstormy16
 	set debug-flags "-gdwarf-2"
diff -urN gdb-orig/gdb/testsuite/gdb.asm/spu.inc gdb-head/gdb/testsuite/gdb.asm/spu.inc
--- gdb-orig/gdb/testsuite/gdb.asm/spu.inc	1970-01-01 01:00:00.000000000 +0100
+++ gdb-head/gdb/testsuite/gdb.asm/spu.inc	2006-11-22 15:34:19.430148776 +0100
@@ -0,0 +1,42 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	stqd    $lr, 16($sp)
+	stqd    $sp, -32($sp)
+	ai      $sp, $sp, -32
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	ai	$sp, $sp, 32
+	lqd     $lr, 16($sp)
+	bi	$lr	
+	.endm
+
+	.macro gdbasm_call subr
+	brsl	$lr, \subr
+	.endm
+
+	.macro gdbasm_several_nops
+	nop
+	nop
+	nop
+	nop
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	stop	0x2000
+	stop 
+	stop 
+	stop 
+	.endm
+
+	comment "startup"
+	.macro gdbasm_startup
+	il	$0, 0
+	ila	$sp, 16368
+	stqd	$0, 0($sp)
+	stqd	$sp, -32($sp)
+	ai	$sp, $sp, -32
+	stqd	$0, 16($sp)
+	.endm
diff -urN gdb-orig/gdb/testsuite/gdb.base/attach.exp gdb-head/gdb/testsuite/gdb.base/attach.exp
--- gdb-orig/gdb/testsuite/gdb.base/attach.exp	2006-11-22 15:37:06.950107064 +0100
+++ gdb-head/gdb/testsuite/gdb.base/attach.exp	2006-11-22 15:34:19.436147864 +0100
@@ -32,6 +32,11 @@
     return 0
 }
 
+# On SPU, this test currently fails because "sleep" is not supported.
+if { [istarget "spu*-*-*"] } {
+	return 0
+}
+
 # are we on a target board
 if [is_remote target] then {
     return 0
diff -urN gdb-orig/gdb/testsuite/gdb.base/term.exp gdb-head/gdb/testsuite/gdb.base/term.exp
--- gdb-orig/gdb/testsuite/gdb.base/term.exp	2006-11-22 15:37:06.955106304 +0100
+++ gdb-head/gdb/testsuite/gdb.base/term.exp	2006-11-22 15:34:19.481141024 +0100
@@ -29,6 +29,11 @@
     continue
 }
 
+if [target_info exists noargs] then {
+    verbose "Skipping term.exp because of noargs."
+    return
+}
+
 gdb_start
 
 #
diff -urN gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp gdb-head/gdb/testsuite/gdb.cp/bs15503.exp
--- gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp	2006-11-22 15:37:06.959105696 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/bs15503.exp	2006-11-22 15:34:19.487140112 +0100
@@ -24,6 +24,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "bs15503"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/exception.exp gdb-head/gdb/testsuite/gdb.cp/exception.exp
--- gdb-orig/gdb/testsuite/gdb.cp/exception.exp	2006-11-22 15:37:06.964104936 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/exception.exp	2006-11-22 15:34:19.492139352 +0100
@@ -44,6 +44,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "exception"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/userdef.exp gdb-head/gdb/testsuite/gdb.cp/userdef.exp
--- gdb-orig/gdb/testsuite/gdb.cp/userdef.exp	2006-11-22 15:37:06.968104328 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/userdef.exp	2006-11-22 15:34:19.497138592 +0100
@@ -27,6 +27,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "userdef"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp gdb-head/gdb/testsuite/gdb.gdb/complaints.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp	2006-11-22 15:37:06.974103416 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/complaints.exp	2006-11-22 15:32:30.763163912 +0100
@@ -27,7 +27,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if ![isnative] {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/observer.exp gdb-head/gdb/testsuite/gdb.gdb/observer.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/observer.exp	2006-11-22 15:37:06.978102808 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/observer.exp	2006-11-22 15:32:18.063096640 +0100
@@ -25,7 +25,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if ![isnative] {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-head/gdb/testsuite/gdb.gdb/selftest.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp	2006-11-22 15:37:06.984101896 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/selftest.exp	2006-11-22 15:31:52.112181304 +0100
@@ -25,7 +25,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if ![isnative] {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp	2006-11-22 15:37:06.988101288 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp	2006-11-22 15:32:43.753184648 +0100
@@ -26,7 +26,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if ![isnative] {
     return
 }
 


-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
  2006-11-22 14:54   ` Ulrich Weigand
@ 2006-11-22 16:11     ` Daniel Jacobowitz
  2006-11-22 17:22       ` Ulrich Weigand
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Jacobowitz @ 2006-11-22 16:11 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: gdb-patches

On Wed, Nov 22, 2006 at 03:54:17PM +0100, Ulrich Weigand wrote:
> Daniel Jacobowitz wrote:
> 
> > How much of this still applies, now that you're building GDB using a
> > cross configuration triplet?  I would imagine isnative now fails.
> 
> They all still apply.  However, you've got a point with isnative --
> the gdb.gdb testcases don't currently use it however.  Maybe they
> should?  The following patch works as well as the original ...

Could you check both is_remote and isnative, please?  The tests don't
work with remote targets (because they send "run -nw" directly to GDB).
They could be made to, but only if not noargs, and noargs is currently
set for gdbserver so there's not much point.

Patch is OK with that change.

-- 
Daniel Jacobowitz
CodeSourcery


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RFA][5/5] New port: Cell BE SPU (testsuite tweaks)
  2006-11-22 16:11     ` Daniel Jacobowitz
@ 2006-11-22 17:22       ` Ulrich Weigand
  0 siblings, 0 replies; 6+ messages in thread
From: Ulrich Weigand @ 2006-11-22 17:22 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz wrote:

> Could you check both is_remote and isnative, please?  The tests don't
> work with remote targets (because they send "run -nw" directly to GDB).
> They could be made to, but only if not noargs, and noargs is currently
> set for gdbserver so there's not much point.

OK, I see.

> Patch is OK with that change.

I've committed the following patch.  Many thanks for reviewing!

Bye,
Ulrich

ChangeLog:

	* gdb.asm/asm-source.exp: Add "spu*-*-*" target.
	* gdb.asm/spu.inc: New file.
	* gdb.base/term.exp: Disable if [target_info exists noargs].
	* gdb.gdb/complaints.exp: Disable if ![isnative].
	* gdb.gdb/selftest.exp: Likewise.
	* gdb.gdb/observer.exp: Likewise.
	* gdb.gdb/xfullpath.exp: Likewise.
	* gdb.base/attach.exp: Disable on SPU target.
	* gdb.cp/bs145503.exp: Likewise.
	* gdb.cp/exception.exp: Likewise.
	* gdb.cp/userdef.exp: Likewise.

diff -urN gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp gdb-head/gdb/testsuite/gdb.asm/asm-source.exp
--- gdb-orig/gdb/testsuite/gdb.asm/asm-source.exp	2006-11-22 15:37:06.945107824 +0100
+++ gdb-head/gdb/testsuite/gdb.asm/asm-source.exp	2006-11-22 15:34:19.425149536 +0100
@@ -120,6 +120,11 @@
         set asm-flags "-xarch=v9 -I${srcdir}/${subdir} -I${objdir}/${subdir}"
 	set debug-flags "-gdwarf-2"
     }
+    "spu*-*-*" {
+       set asm-arch spu
+       set asm-flags "-I${srcdir}/${subdir} -I${objdir}/${subdir} --no-warn"
+       set debug-flags "-gdwarf-2"
+    }
     "xstormy16-*-*" {
         set asm-arch xstormy16
 	set debug-flags "-gdwarf-2"
diff -urN gdb-orig/gdb/testsuite/gdb.asm/spu.inc gdb-head/gdb/testsuite/gdb.asm/spu.inc
--- gdb-orig/gdb/testsuite/gdb.asm/spu.inc	1970-01-01 01:00:00.000000000 +0100
+++ gdb-head/gdb/testsuite/gdb.asm/spu.inc	2006-11-22 15:34:19.430148776 +0100
@@ -0,0 +1,42 @@
+	comment "subroutine prologue"
+	.macro gdbasm_enter
+	stqd    $lr, 16($sp)
+	stqd    $sp, -32($sp)
+	ai      $sp, $sp, -32
+	.endm
+
+	comment "subroutine epilogue"
+	.macro gdbasm_leave
+	ai	$sp, $sp, 32
+	lqd     $lr, 16($sp)
+	bi	$lr	
+	.endm
+
+	.macro gdbasm_call subr
+	brsl	$lr, \subr
+	.endm
+
+	.macro gdbasm_several_nops
+	nop
+	nop
+	nop
+	nop
+	.endm
+
+	comment "exit (0)"
+	.macro gdbasm_exit0
+	stop	0x2000
+	stop 
+	stop 
+	stop 
+	.endm
+
+	comment "startup"
+	.macro gdbasm_startup
+	il	$0, 0
+	ila	$sp, 16368
+	stqd	$0, 0($sp)
+	stqd	$sp, -32($sp)
+	ai	$sp, $sp, -32
+	stqd	$0, 16($sp)
+	.endm
diff -urN gdb-orig/gdb/testsuite/gdb.base/attach.exp gdb-head/gdb/testsuite/gdb.base/attach.exp
--- gdb-orig/gdb/testsuite/gdb.base/attach.exp	2006-11-22 15:37:06.950107064 +0100
+++ gdb-head/gdb/testsuite/gdb.base/attach.exp	2006-11-22 15:34:19.436147864 +0100
@@ -32,6 +32,11 @@
     return 0
 }
 
+# On SPU, this test currently fails because "sleep" is not supported.
+if { [istarget "spu*-*-*"] } {
+	return 0
+}
+
 # are we on a target board
 if [is_remote target] then {
     return 0
diff -urN gdb-orig/gdb/testsuite/gdb.base/term.exp gdb-head/gdb/testsuite/gdb.base/term.exp
--- gdb-orig/gdb/testsuite/gdb.base/term.exp	2006-11-22 15:37:06.955106304 +0100
+++ gdb-head/gdb/testsuite/gdb.base/term.exp	2006-11-22 15:34:19.481141024 +0100
@@ -29,6 +29,11 @@
     continue
 }
 
+if [target_info exists noargs] then {
+    verbose "Skipping term.exp because of noargs."
+    return
+}
+
 gdb_start
 
 #
diff -urN gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp gdb-head/gdb/testsuite/gdb.cp/bs15503.exp
--- gdb-orig/gdb/testsuite/gdb.cp/bs15503.exp	2006-11-22 15:37:06.959105696 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/bs15503.exp	2006-11-22 15:34:19.487140112 +0100
@@ -24,6 +24,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "bs15503"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/exception.exp gdb-head/gdb/testsuite/gdb.cp/exception.exp
--- gdb-orig/gdb/testsuite/gdb.cp/exception.exp	2006-11-22 15:37:06.964104936 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/exception.exp	2006-11-22 15:34:19.492139352 +0100
@@ -44,6 +44,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "exception"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.cp/userdef.exp gdb-head/gdb/testsuite/gdb.cp/userdef.exp
--- gdb-orig/gdb/testsuite/gdb.cp/userdef.exp	2006-11-22 15:37:06.968104328 +0100
+++ gdb-head/gdb/testsuite/gdb.cp/userdef.exp	2006-11-22 15:34:19.497138592 +0100
@@ -27,6 +27,11 @@
 
 if { [skip_cplus_tests] } { continue }
 
+# On SPU this test fails because the executable exceeds local storage size.
+if { [istarget "spu*-*-*"] } {
+        return 0
+}
+
 set testfile "userdef"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp gdb-head/gdb/testsuite/gdb.gdb/complaints.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/complaints.exp	2006-11-22 15:37:06.974103416 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/complaints.exp	2006-11-22 17:20:11.012128128 +0100
@@ -27,7 +27,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if { [is_remote target] || ![isnative] } then {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/observer.exp gdb-head/gdb/testsuite/gdb.gdb/observer.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/observer.exp	2006-11-22 15:37:06.978102808 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/observer.exp	2006-11-22 17:20:19.306197656 +0100
@@ -25,7 +25,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if { [is_remote target] || ![isnative] } then {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp gdb-head/gdb/testsuite/gdb.gdb/selftest.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/selftest.exp	2006-11-22 15:37:06.984101896 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/selftest.exp	2006-11-22 17:12:31.700188384 +0100
@@ -25,7 +25,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if { [is_remote target] || ![isnative] } then {
     return
 }
 
diff -urN gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp
--- gdb-orig/gdb/testsuite/gdb.gdb/xfullpath.exp	2006-11-22 15:37:06.988101288 +0100
+++ gdb-head/gdb/testsuite/gdb.gdb/xfullpath.exp	2006-11-22 17:20:30.442103656 +0100
@@ -26,7 +26,7 @@
 set bug_id 0
 
 # are we on a target board
-if [is_remote target] {
+if { [is_remote target] || ![isnative] } then {
     return
 }
 
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-11-22 17:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-11 18:40 [RFA][5/5] New port: Cell BE SPU (testsuite tweaks) Ulrich Weigand
2006-11-22 14:16 ` [PING] " Ulrich Weigand
2006-11-22 14:27 ` Daniel Jacobowitz
2006-11-22 14:54   ` Ulrich Weigand
2006-11-22 16:11     ` Daniel Jacobowitz
2006-11-22 17:22       ` Ulrich Weigand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox