diff options
author | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:57 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2016-06-21 01:11:57 +0100 |
commit | ac69f7863a6b5dbd1792356275de437371b8c879 (patch) | |
tree | 753e80633e0c23edfff69f969d78c215b9dc2bb3 /gdb/testsuite/gdb.base/new-ui.c | |
parent | 49940788ab38b9d58c663cf38855f29c0ebb1b55 (diff) | |
download | gdb-ac69f7863a6b5dbd1792356275de437371b8c879.zip gdb-ac69f7863a6b5dbd1792356275de437371b8c879.tar.gz gdb-ac69f7863a6b5dbd1792356275de437371b8c879.tar.bz2 |
Add "new-ui console" tests
This adds a test that uses new-ui to create a secondary console, and
then runs some basic smoke tests. It ensures that:
- synchronous commands send output to the UI that initiated it
- asynchronous events like breakpoint hits are reported on all
consoles.
- "new-ui" without arguments doesn't crash.
- The "new-ui" command doesn't repeat.
gdb/testsuite/ChangeLog:
2016-06-21 Pedro Alves <palves@redhat.com>
* gdb.base/new-ui.exp: New file.
* lib/mi-support.exp (switch_gdb_spawn_id): Move to ...
* lib/gdb.exp (switch_gdb_spawn_id): ... here.
(with_spawn_id): New procedure.
Diffstat (limited to 'gdb/testsuite/gdb.base/new-ui.c')
-rw-r--r-- | gdb/testsuite/gdb.base/new-ui.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/new-ui.c b/gdb/testsuite/gdb.base/new-ui.c new file mode 100644 index 0000000..8fff0bc --- /dev/null +++ b/gdb/testsuite/gdb.base/new-ui.c @@ -0,0 +1,42 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2016 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/>. + +*/ + +volatile int global = 0; + +int +main (void) +{ + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; /* set break main console here */ + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; + global = 1; /* set break extra console here */ + return 0; +} |