2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / catch-syscall.exp
index 96884c44d528eec3710f6be655b00eb07990e1f4..4a05292e55330e097d5605548896b2791543317c 100644 (file)
@@ -1,5 +1,4 @@
-#   Copyright 1997, 1999, 2007, 2008, 2010, 2011
-#   Free Software Foundation, Inc.
+#   Copyright 1997-2013 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
@@ -24,6 +23,20 @@ if { [is_remote target] || ![isnative] } then {
     continue
 }
 
+# Until "catch syscall" is implemented on other targets...
+if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
+    continue
+}
+
+# This shall be updated whenever 'catch syscall' is implemented
+# on some architecture.
+#if { ![istarget "i\[34567\]86-*-linux*"]
+if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
+     && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
+     && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"]
+     && ![istarget "mips*-linux*"] } {
+     continue
+}
 
 global srcfile
 set testfile "catch-syscall"
@@ -44,21 +57,6 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
      return -1
 }
 
-# Until "catch syscall" is implemented on other targets...
-if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then {
-    continue
-}
-
-# This shall be updated whenever 'catch syscall' is implemented
-# on some architecture.
-#if { ![istarget "i\[34567\]86-*-linux*"]
-if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
-     && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"]
-     && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"]
-     && ![istarget "mips*-linux*"] } {
-     continue
-}
-
 # Internal procedure used to check if, after issuing a 'catch syscall'
 # command (without arguments), the 'info breakpoints' command displays
 # that '"any syscall"' is to be caught.
@@ -289,6 +287,11 @@ proc do_syscall_tests {} {
     set thistest "catch syscall to a nonsense syscall is prohibited"
     gdb_test "catch syscall nonsense_syscall" "Unknown syscall name .*" $thistest
 
+    # Regression test for syscall completer bug.
+    gdb_test "complete catch syscall close chroo" \
+       "catch syscall close chroot" \
+       "complete catch syscall with multiple words"
+
     # Testing the 'catch syscall' command without arguments.
     # This test should catch any syscalls.
     if [runto_main] then { test_catch_syscall_without_args }
This page took 0.024945 seconds and 4 git commands to generate.