OSDN Git Service

2000-11-09 Fernando Nasser <fnasser@redhat.com>
authorfnasser <fnasser>
Thu, 9 Nov 2000 23:29:20 +0000 (23:29 +0000)
committerfnasser <fnasser>
Thu, 9 Nov 2000 23:29:20 +0000 (23:29 +0000)
        * gdb.c++/templates.exp (test_template_breakpoints): Change Britsh
        spelling "cancelled" to U.S. spelling "canceled" to match changes
        made to gdb.
        * gdb.c++/ovldbreak.exp: Ditto.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.c++/ovldbreak.exp
gdb/testsuite/gdb.c++/templates.exp

index 91f97eb..7a0d322 100644 (file)
@@ -1,3 +1,10 @@
+2000-11-09  Fernando Nasser  <fnasser@redhat.com>
+
+       * gdb.c++/templates.exp (test_template_breakpoints): Change Britsh
+       spelling "cancelled" to U.S. spelling "canceled" to match changes
+       made to gdb.
+       * gdb.c++/ovldbreak.exp: Ditto.
+
 2000-11-06  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
 
        * gdb.base/callfuncs.c (main):  Moved to end of file, call
index c90b51d..97271d3 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1998 Free Software Foundation, Inc.
+# Copyright (C) 1998, 1999 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
@@ -36,6 +36,8 @@ if $tracelevel then {
 set prms_id 0
 set bug_id 0
 
+if { [skip_cplus_tests] } { continue }
+
 set testfile "ovldbreak"
 set srcfile ${testfile}.cc
 set binfile ${objdir}/${subdir}/${testfile}
@@ -454,16 +456,16 @@ gdb_expect {
 -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
             send_gdb "0\n"
             gdb_expect {
-               -re "cancelled\r\n$gdb_prompt $" {
-                       pass "set bp cancelled" }
+               -re "canceled\r\n$gdb_prompt $" {
+                       pass "set bp canceled" }
                -re ".*$gdb_prompt $" {
-                       fail "set bp cancelled  wrong bp reply" }
+                       fail "set bp canceled  wrong bp reply" }
                timeout           {
-                       fail "(timeout)set bp cancelled wrong bp reply" }
+                       fail "(timeout)set bp canceled wrong bp reply" }
              }
          }
-    -re ".*$gdb_prompt $" { fail "set bp cancelled(wrong menu)" }
-    timeout           { fail "(timeout)set bp cancelled(wrong menu)" }
+    -re ".*$gdb_prompt $" { fail "set bp canceled(wrong menu)" }
+    timeout           { fail "(timeout)set bp canceled(wrong menu)" }
   }
 
 
@@ -521,7 +523,7 @@ gdb_expect {
 -re "\\\[0\\\] cancel\r\n\\\[1\\\] all\r\n\\\[2\\\] foo::overload1arg\\(double\\) at.*$srcfile:121\r\n\\\[3\\\] foo::overload1arg\\(float\\) at.*$srcfile:120\r\n\\\[4\\\] foo::overload1arg\\(unsigned long\\) at.*$srcfile:119\r\n\\\[5\\\] foo::overload1arg\\(long\\) at.*$srcfile:118\r\n\\\[6\\\] foo::overload1arg\\(unsigned int\\) at.*$srcfile:117\r\n\\\[7\\\] foo::overload1arg\\(int\\) at.*$srcfile:116\r\n\\\[8\\\] foo::overload1arg\\(unsigned short\\) at.*$srcfile:115\r\n\\\[9\\\] foo::overload1arg\\(short\\) at.*$srcfile:114\r\n\\\[10\\\] foo::overload1arg\\(unsigned char\\) at.*$srcfile:113\r\n\\\[11\\\] foo::overload1arg\\(signed char\\) at.*$srcfile:112\r\n\\\[12\\\] foo::overload1arg\\(char\\) at.*$srcfile:111\r\n\\\[13\\\] foo::overload1arg\\(void\\) at.*$srcfile:110\r\n> $" {
             send_gdb "1\n"
             gdb_expect {
-               -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nMultiple breakpoints were set.\r\nUse the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
+               -re "Breakpoint $decimal at $hex: file.*$srcfile, line 121.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 120.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 119.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 118.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 117.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 116.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 115.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 114.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 113.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 112.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 111.\r\nBreakpoint $decimal at $hex: file.*$srcfile, line 110.\r\nwarning: Multiple breakpoints were set.\r\nwarning: Use the .delete. command to delete unwanted breakpoints.\r\n$gdb_prompt $" {
                        pass "set bp on all overload1arg()" }
                -re ".*$gdb_prompt $" {
                        fail "set bp on all overload1arg() wrong bp reply" }
@@ -552,129 +554,30 @@ gdb_test "info break" \
     "breakpoint info"
 
 
+proc continue_to_bp_overloaded {n formals actuals} {
+    global gdb_prompt hex decimal srcfile 
     send_gdb "cont\n"
     gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 25, foo::overload1arg \\(this=$hex\\) at.*$srcfile:110\r\n110\[\t \]+int foo::overload1arg \\(void\\)\[\t \]+\{  return 1; \}\r\n$gdb_prompt $" {
-            pass "continue to bp overloaded : void"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : void"  }
-        timeout { fail "(timeout) continue to bp overloaded : void"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 24, foo::overload1arg \\(this=$hex, arg=2 \\'\\\\002\\'\\) at.*$srcfile:111\r\n111\[\t \]+int foo::overload1arg \\(char arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : char"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : char"  }
-        timeout { fail "(timeout) continue to bp overloaded : char"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 23, foo::overload1arg \\(this=$hex, arg=3 \\'\\\\003\\'\\) at.*$srcfile:112\r\n112\[\t \]+int foo::overload1arg \\(signed char arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : signed char"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : signed char"  }
-        timeout { fail "(timeout) continue to bp overloaded : signed char"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 22, foo::overload1arg \\(this=$hex, arg=4 \\'\\\\004\\'\\) at.*$srcfile:113\r\n113\[\t \]+int foo::overload1arg \\(unsigned char arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : unsigned char"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : unsigned char"  }
-        timeout { fail "(timeout) continue to bp overloaded : unsigned char"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 21, foo::overload1arg \\(this=$hex, arg=5\\) at.*$srcfile:114\r\n114\[\t \]+int foo::overload1arg \\(short arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : short"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : short"  }
-        timeout { fail "(timeout) continue to bp overloaded : short"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 20, foo::overload1arg \\(this=$hex, arg=6\\) at.*$srcfile:115\r\n115\[\t \]+int foo::overload1arg \\(unsigned short arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : unsigned short"
+        -re "Continuing.\r\n\r\nBreakpoint $n, (${hex} in )?foo::overload1arg \\(this=${hex}(, )?${actuals}\\) at.*$srcfile:${decimal}\r\n${decimal}\[\t \]+int foo::overload1arg \\(${formals}\\).*\r\n$gdb_prompt $" {
+            pass "continue to bp overloaded : ${formals}"
         }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : unsigned short"  }
-        timeout { fail "(timeout) continue to bp overloaded : unsigned short"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 19, foo::overload1arg \\(this=$hex, arg=7\\) at.*$srcfile:116\r\n116\[\t \]+int foo::overload1arg \\(int arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : int"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : int"  }
-        timeout { fail "(timeout) continue to bp overloaded : int"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 18, foo::overload1arg \\(this=$hex, arg=8\\) at.*$srcfile:117\r\n117\[\t \]+int foo::overload1arg \\(unsigned int arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : unsigned int"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : unsigned int"  }
-        timeout { fail "(timeout) continue to bp overloaded : unsigned int"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 17, foo::overload1arg \\(this=$hex, arg=9\\) at.*$srcfile:118\r\n118\[\t \]+int foo::overload1arg \\(long arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : long"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : long"  }
-        timeout { fail "(timeout) continue to bp overloaded : long"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 16, foo::overload1arg \\(this=$hex, arg=10\\) at.*$srcfile:119\r\n119\[\t \]+int foo::overload1arg \\(unsigned long arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : unsigned long"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : unsigned long"  }
-        timeout { fail "(timeout) continue to bp overloaded : unsigned long"  }
-    }
-
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 15, foo::overload1arg \\(this=$hex, arg=100\\) at.*$srcfile:120\r\n120\[\t \]+int foo::overload1arg \\(float arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : float"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : float"  }
-        timeout { fail "(timeout) continue to bp overloaded : float"  }
-    }
-
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nBreakpoint 14, foo::overload1arg \\(this=$hex, arg=200\\) at.*$srcfile:121\r\n121\[\t \]+int foo::overload1arg \\(double arg\\).*$gdb_prompt $" {
-            pass "continue to bp overloaded : double"
-        }
-        -re "$gdb_prompt $" { fail "continue to bp overloaded : double"  }
-        timeout { fail "(timeout) continue to bp overloaded : double"  }
+        -re "$gdb_prompt $" { fail "continue to bp overloaded : ${formals}"  }
+        timeout { fail "(timeout) continue to bp overloaded : ${formals}"  }
     }
+}
 
-    send_gdb "cont\n"
-    gdb_expect {
-        -re "Continuing.\r\n\r\nProgram exited normally.\r\n$gdb_prompt $" {
-            pass "finish program"
-        }
-        -re "$gdb_prompt $" { fail "finish program"  }
-        timeout { fail "(timeout) finish program"  }
-    }
+continue_to_bp_overloaded 25 "void" ""
+continue_to_bp_overloaded 24 "char arg" "arg=2 \\'\\\\002\\'"
+continue_to_bp_overloaded 23 "signed char arg" "arg=3 \\'\\\\003\\'"
+continue_to_bp_overloaded 22 "unsigned char arg" "arg=4 \\'\\\\004\\'"
+continue_to_bp_overloaded 21 "short arg" "arg=5"
+continue_to_bp_overloaded 20 "unsigned short arg" "arg=6"
+continue_to_bp_overloaded 19 "int arg" "arg=7"
+continue_to_bp_overloaded 18 "unsigned int arg" "arg=8"
+continue_to_bp_overloaded 17 "long arg" "arg=9"
+continue_to_bp_overloaded 16 "unsigned long arg" "arg=10"
+continue_to_bp_overloaded 15 "float arg" "arg=100"
+continue_to_bp_overloaded 14 "double arg" "arg=200"
+
+
+gdb_continue_to_end "finish program"
index 91acc82..d0ee96d 100644 (file)
@@ -105,12 +105,12 @@ proc test_template_breakpoints {} {
     gdb_expect {
        -re "0. cancel.*\[\r\n\]*.1. all.*\[\r\n\]*.2. T5<int>::T5\\(int\\) at .*\[\r\n\]*.3. T5<int>::T5\\(T5<int> const &\\) at .*\[\r\n\]*> $" {
            gdb_test "0" \
-               "cancelled" \
+               "canceled" \
                "constructor breakpoint (obsolete format!)"
        }
        -re ".0. cancel\[\r\n\]*.1. all\[\r\n\]*.2. T5<int>::T5\\(T5<int> const &\\) at .*templates.cc:.*\[\r\n\]*.3. T5<int>::T5\\(int\\) at .*templates.cc:.*\[\r\n\]*> $" {
            gdb_test "0" \
-               "cancelled" \
+               "canceled" \
                "constructor breakpoint"
        }
        -re ".*$gdb_prompt $" { fail "constructor breakpoint" }