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

Unified Diff: gdb/testsuite/gdb.trace/disconnected-tracing.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 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.trace/disconnected-tracing.c ('k') | gdb/testsuite/gdb.trace/ftrace.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.trace/disconnected-tracing.exp
diff --git a/gdb/testsuite/gdb.trace/disconnected-tracing.exp b/gdb/testsuite/gdb.trace/disconnected-tracing.exp
new file mode 100644
index 0000000000000000000000000000000000000000..79194f1b555c50662e8252a90d6663999513d0a6
--- /dev/null
+++ b/gdb/testsuite/gdb.trace/disconnected-tracing.exp
@@ -0,0 +1,74 @@
+# Copyright 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
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# 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 of disconnected-tracing.
+
+load_lib "trace-support.exp";
+
+standard_testfile
+set executable $testfile
+set expfile $testfile.exp
+set gdbserver_reconnect_p 1
+
+if { [info proc gdb_reconnect] == "" } {
+ unsupported "target does not support reconnect"
+ return -1
+}
+
+if [prepare_for_testing $expfile $executable $srcfile \
+ {debug nowarnings}] {
+ untested "failed to prepare for trace tests"
+ return -1
+}
+
+if ![runto_main] {
+ fail "can't run to main to check for trace support"
+ return -1
+}
+
+if ![gdb_target_supports_trace] {
+ unsupported "target does not support trace"
+ return -1;
+}
+
+delete_breakpoints
+gdb_test_no_output "set confirm off"
+gdb_test_no_output "set disconnected-tracing on"
+gdb_test "trace main" ".*"
+gdb_test_no_output "tstart"
+
+gdb_test "info tracepoints" ".*in main at.*" "first info tracepoints"
+
+gdb_test "disconnect" "Ending remote debugging\\." "first disconnect"
+if { [gdb_reconnect] == 0 } {
+ pass "first reconnect after unload"
+} else {
+ fail "first reconnect after unload"
+ return 0
+}
+gdb_test "info tracepoints" ".*in main at.*" "second info tracepoints"
+
+delete_breakpoints
+gdb_test "info tracepoints" ".*No tracepoints..*" "third info tracepoints"
+
+gdb_test "disconnect" "Ending remote debugging\\." "second disconnect"
+if { [gdb_reconnect] == 0 } {
+ pass "second reconnect after unload"
+} else {
+ fail "second reconnect after unload"
+ return 0
+}
+gdb_test "info tracepoints" ".*in main at.*" "fourth info tracepoints"
+
« no previous file with comments | « gdb/testsuite/gdb.trace/disconnected-tracing.c ('k') | gdb/testsuite/gdb.trace/ftrace.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698