2011-10-28 Pedro Alves <pedro@codesourcery.com>
[binutils-gdb.git] / gdb / testsuite / gdb.threads / attach-stopped.exp
index e0998bab2aab4572a22c90ab946348b3211ff891..3fabb032f8276bfd1febef4fc0721c24bc3c416b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright 2008, 2009, 2010, 2011 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
@@ -18,7 +18,8 @@
 # This file was updated by Jan Kratochvil <jan.kratochvil@redhat.com>.
 
 # This test only works on Linux
-if { ![isnative] || [is_remote host] || ![istarget *-linux*] } {
+if { ![isnative] || [is_remote host] || [target_info exists use_gdb_stub]
+     || ![istarget *-linux*] } {
     continue
 }
 
@@ -78,7 +79,7 @@ proc corefunc { threadtype } {
        gdb_test "bt" ".*sleep.*main.*" "$threadtype: attach2 to stopped bt"
     }
     # This breakpoint is there for old/non-x86 kernels not restarting syscalls.
-    gdb_breakpoint [gdb_get_line_number "Second sleep"]
+    gdb_breakpoint $srcfile:[gdb_get_line_number "Second sleep"]
     set test "$threadtype: attach2 continue"
     gdb_test_multiple "continue" "continue ($test)" {
        -re "Continuing" {