Index: gdb/testsuite/gdb.server/server-exec-info.exp |
diff --git a/gdb/testsuite/gdb.base/watch-non-mem.exp b/gdb/testsuite/gdb.server/server-exec-info.exp |
similarity index 53% |
copy from gdb/testsuite/gdb.base/watch-non-mem.exp |
copy to gdb/testsuite/gdb.server/server-exec-info.exp |
index 59351abfd365fe6ac34c4fb1b85c768807a29bb4..6635805c99170a7c3d1ca400dd51bb1eb0752193 100644 |
--- a/gdb/testsuite/gdb.base/watch-non-mem.exp |
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp |
@@ -1,5 +1,5 @@ |
-# Copyright 2010-2012 Free Software Foundation, Inc. |
- |
+# Copyright (C) 2012 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 |
# the Free Software Foundation; either version 3 of the License, or |
@@ -13,28 +13,22 @@ |
# You should have received a copy of the GNU General Public License |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
-# |
-# Tests watchpoints that watch expressions that don't involve memory. |
-# |
- |
-set testfile "watch-non-mem" |
-set srcfile ${testfile}.c |
-set binfile ${objdir}/${subdir}/${testfile} |
+load_lib gdbserver-support.exp |
-if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { |
- untested ${testfile}.exp |
- return -1 |
-} |
- |
-if ![runto_main] then { |
- fail "Can't run to main" |
+# We test for skip_shlib_tests in this test because without a main |
+# exec file we only have the exec target loaded if shared libraries |
+# are present. |
+if {[skip_gdbserver_tests] || [skip_shlib_tests]} { |
return |
} |
-gdb_test "watch \$pc" \ |
- "Watchpoint .*: .pc" \ |
- "set write watchpoint on \$pc" |
+standard_testfile server.c |
+if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] { |
+ return -1 |
+} |
-gdb_test "continue" \ |
- "Watchpoint 2: .pc.*Old value = .*New value = .*" \ |
- "watchpoint on \$pc works" |
+gdb_test "file" ".*" "file" \ |
+ {Discard symbol table from `.*'\? \(y or n\) } "y" |
+gdbserver_run "" |
+gdb_test "set sysroot remote:" |
+gdb_test "info files" "\r\nLocal exec file:\r\n\t<no file loaded>" |