a8767b3
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
f524ac5
From: Fedora GDB patches <invalid@email.com>
f524ac5
Date: Fri, 27 Oct 2017 21:07:50 +0200
f524ac5
Subject: gdb-6.3-focus-cmd-prev-test.patch
f524ac5
f637971
;; Test a crash on `focus cmd', `focus prev' commands.
f637971
;;=fedoratest
f524ac5
f637971
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
f637971
new file mode 100644
f637971
--- /dev/null
f637971
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
Jan Kratochvil dbc649d
@@ -0,0 +1,40 @@
ed268f2
+# Copyright 2008 Free Software Foundation, Inc.
ed268f2
+
ed268f2
+# This program is free software; you can redistribute it and/or modify
ed268f2
+# it under the terms of the GNU General Public License as published by
ed268f2
+# the Free Software Foundation; either version 2 of the License, or
ed268f2
+# (at your option) any later version.
ed268f2
+#
ed268f2
+# This program is distributed in the hope that it will be useful,
ed268f2
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
ed268f2
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ed268f2
+# GNU General Public License for more details.
ed268f2
+#
ed268f2
+# You should have received a copy of the GNU General Public License
ed268f2
+# along with this program; if not, write to the Free Software
ed268f2
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ed268f2
+
ed268f2
+if $tracelevel then {
ed268f2
+    strace $tracelevel
ed268f2
+}
ed268f2
+
ed268f2
+gdb_exit
ed268f2
+gdb_start
ed268f2
+
Jan Kratochvil 0fffd6c
+# Do not use gdb_test or \r\n there since:
Jan Kratochvil 0fffd6c
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
Jan Kratochvil 0fffd6c
+#     Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
Jan Kratochvil 0fffd6c
+
Jan Kratochvil 0fffd6c
+set test "focus cmd"
Jan Kratochvil 0fffd6c
+gdb_test_multiple $test $test {
Jan Kratochvil 0fffd6c
+    -re "$gdb_prompt $" {
Jan Kratochvil 0fffd6c
+	pass $test
Jan Kratochvil 0fffd6c
+    }
Jan Kratochvil 0fffd6c
+}
Jan Kratochvil 0fffd6c
+
Jan Kratochvil 0fffd6c
+set test "focus prev"
Jan Kratochvil 0fffd6c
+gdb_test_multiple $test $test {
Jan Kratochvil 0fffd6c
+    -re "$gdb_prompt $" {
Jan Kratochvil 0fffd6c
+	pass $test
Jan Kratochvil 0fffd6c
+    }
Jan Kratochvil 0fffd6c
+}