aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-prompt.c
diff options
context:
space:
mode:
authormatt rice <ratmice@gmail.com>2011-09-02 21:16:54 +0000
committermatt rice <ratmice@gmail.com>2011-09-02 21:16:54 +0000
commit7d8e6458d594b84b94099d1069bb44619885e293 (patch)
tree36392698de0fd93e578dac1b77aabc50400bb906 /gdb/testsuite/gdb.python/py-prompt.c
parent84636d2874122cf547b3eaee494544636931c083 (diff)
downloadgdb-7d8e6458d594b84b94099d1069bb44619885e293.zip
gdb-7d8e6458d594b84b94099d1069bb44619885e293.tar.gz
gdb-7d8e6458d594b84b94099d1069bb44619885e293.tar.bz2
PR gdb/10720
* event-top.c (cli_command_loop): Replace readline setup with direct call to display_gdb_prompt. (display_gdb_prompt): Do not call observer mechanism during synchronous execution. testsuite: * lib/prompt.exp: New file for testing the first prompt. * gdb.python/py-prompt.exp: Ditto. * gdb.python/py-prompt.c: Ditto (copy of ext-attach.c).
Diffstat (limited to 'gdb/testsuite/gdb.python/py-prompt.c')
-rw-r--r--gdb/testsuite/gdb.python/py-prompt.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-prompt.c b/gdb/testsuite/gdb.python/py-prompt.c
new file mode 100644
index 0000000..8d84f09
--- /dev/null
+++ b/gdb/testsuite/gdb.python/py-prompt.c
@@ -0,0 +1,31 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2007, 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
+ 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/>. */
+
+/* This program is intended to be started outside of gdb, and then
+ attached to by gdb. It loops for a while, but not forever. */
+
+#include <unistd.h>
+
+int main ()
+{
+ int i;
+
+ for (i = 0; i < 120; i++)
+ sleep (1);
+
+ return 0;
+}