[commit] Fix up return values in ctti.exp

Daniel Jacobowitz drow@false.org
Mon Nov 2 15:55:00 GMT 2009


This test is bit-rotten because it is disabled for GCC.  It still
doesn't pass with GCC, so I left it disabled, but I hope that Keith's
branch will resolve this.

Meanwhile, while trying it with local patches for RealView compiler
support, I discovered that the exp file expects some functions to
return -126 when their return type is "unsigned char".  It should be
130 instead.

Checked in.

-- 
Daniel Jacobowitz
CodeSourcery

2009-11-02  Daniel Jacobowitz  <dan@codesourcery.com>

	* gdb.cp/ctti.exp: Correct return values for unsigned char functions.

---
 gdb/testsuite/gdb.cp/ctti.exp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Index: gdb-mainline/gdb/testsuite/gdb.cp/ctti.exp
===================================================================
--- gdb-mainline.orig/gdb/testsuite/gdb.cp/ctti.exp	2009-01-02 21:58:04.000000000 -0800
+++ gdb-mainline/gdb/testsuite/gdb.cp/ctti.exp	2009-10-31 07:02:05.000000000 -0700
@@ -112,7 +112,7 @@ gdb_test_multiple "print add<float>(2.25
 }
 
 gdb_test_multiple "print add<unsigned char>('A','A')" "print add<unsigned char>('A','A')" {
-    -re "\\$\[0-9\]+ = -126 .*\r\n$gdb_prompt $" {
+    -re "\\$\[0-9\]+ = 130 .*\r\n$gdb_prompt $" {
 	pass "print add<unsigned char>('A','A')"
     }
     -re "No symbol \"add<unsigned char>\" in current context.\r\n$gdb_prompt $" {
@@ -142,7 +142,7 @@ gdb_test_multiple "print add2<float>(2.2
 }
 
 gdb_test_multiple "print add2<unsigned char>('A','A')" "print add2<unsigned char>('A','A')" {
-    -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+    -re "\\$\[0-9]+ = 130 .*$gdb_prompt $" {
 	pass "print add2<unsigned char>('A','A')"
     }
     -re "No symbol \"add2<unsigned char>\" in current context.\r\n$gdb_prompt $" {
@@ -172,7 +172,7 @@ gdb_test_multiple "print add3<float>(2.2
 }
 
 gdb_test_multiple "print add3<unsigned char>('A','A')" "print add3<unsigned char>('A','A')" {
-    -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+    -re "\\$\[0-9]+ = 130 .*$gdb_prompt $" {
 	pass "print add3<unsigned char>('A','A')"
     }
     -re "No symbol \"add3<unsigned char>\" in current context.\r\n$gdb_prompt $" {
@@ -202,7 +202,7 @@ gdb_test_multiple "print add4<float>(2.2
 }
 
 gdb_test_multiple "print add4<unsigned char>('A','A')" "print add4<unsigned char>('A','A')" {
-    -re "\\$\[0-9]+ = -126 .*$gdb_prompt $" {
+    -re "\\$\[0-9]+ = 130 .*$gdb_prompt $" {
 	pass "print add4<unsigned char>('A','A')"
     }
     -re "No symbol \"add4<unsigned char>\" in current context.\r\n$gdb_prompt $" {



More information about the Gdb-patches mailing list