Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: gdb/testsuite/gdb.server/server-kill.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.server/server-kill.c ('k') | gdb/testsuite/gdb.server/server-mon.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.server/server-kill.exp
diff --git a/gdb/testsuite/gdb.server/server-run.exp b/gdb/testsuite/gdb.server/server-kill.exp
similarity index 58%
copy from gdb/testsuite/gdb.server/server-run.exp
copy to gdb/testsuite/gdb.server/server-kill.exp
index da357b4a21e64a4afb4be08967966aa09f828ec4..75c962705e3a0149bee2b3ea801aacdcb54da0f3 100644
--- a/gdb/testsuite/gdb.server/server-run.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -1,7 +1,7 @@
# This testcase is part of GDB, the GNU debugger.
-
-# Copyright 2005, 2007-2012 Free Software Foundation, Inc.
-
+#
+# Copyright 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
# the Free Software Foundation; either version 3 of the License, or
@@ -15,37 +15,31 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test the basic functionality of gdbserver.
-
load_lib gdbserver-support.exp
-standard_testfile server.c
+standard_testfile
-if { [skip_gdbserver_tests] } {
+if {[skip_gdbserver_tests]} {
return 0
}
-if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
+if { [prepare_for_testing ${testfile}.exp ${testfile}] } {
return -1
}
-gdb_exit
-gdb_start
-gdb_load $binfile
-
# Make sure we're disconnected, in case we're testing with an
# extended-remote board, therefore already connected.
gdb_test "disconnect" ".*"
gdbserver_run ""
-gdb_reinitialize_dir $srcdir/$subdir
-# We are now stopped at the program's entry point. On targets which use
-# SVR4 dynamic linking, we should have automatically loaded symbols for
-# the dynamic linker.
-if { [istarget *-*-linux*] } {
- gdb_test "info shared" "From.*To.*" "loaded dynamic linker"
-}
+# Otherwise the breakpoint at 'main' would not cause insert
+# breakpoints during first step.
+delete_breakpoints
+
+set server_pid [exp_pid -i [board_info target fileid]]
+remote_exec target "kill -9 $server_pid"
-gdb_breakpoint main
-gdb_test "continue" "Breakpoint.* main .*" "continue to main"
+# Force GDB to talk with GDBserver, so that we can get the
+# "connection closed" error.
+gdb_test "tstatus" {Remote connection closed|Remote communication error\. Target disconnected\.: Connection reset by peer\.}
« no previous file with comments | « gdb/testsuite/gdb.server/server-kill.c ('k') | gdb/testsuite/gdb.server/server-mon.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698