aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c
diff options
context:
space:
mode:
authorLuis Machado <lgustavo@codesourcery.com>2016-04-13 15:22:14 -0500
committerLuis Machado <lgustavo@codesourcery.com>2016-04-13 15:22:14 -0500
commit7d49b1d0b08426c650a69a6c4971cba56a4e6af1 (patch)
tree4fbab43003df76da6cd767c867f253bf95a9d59c /gdb/testsuite/gdb.server/connect-with-no-symbol-file.c
parent57d1de9cf3ba8dd98eaf4a3d131c05ec4c49779d (diff)
downloadgdb-7d49b1d0b08426c650a69a6c4971cba56a4e6af1.zip
gdb-7d49b1d0b08426c650a69a6c4971cba56a4e6af1.tar.gz
gdb-7d49b1d0b08426c650a69a6c4971cba56a4e6af1.tar.bz2
Test GDB connection to GDBserver with no symbol files
This test exercises the scenarios where we attempt to connect GDB to GDBserver in standard remote mode, query the symbol file path, attempt to open said symbol file on GDB's end and fail, causing the connection to drop abruptly. Regression-tested on x86-64/Ubuntu. With an unpatched GDB we should see this: FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=permission: connection to GDBserver succeeded (the program is no longer running) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=: action=delete: connection to GDBserver succeeded (the program is no longer running) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=target:: action=permission: connection to GDBserver succeeded (the program is no longer running) FAIL: gdb.server/connect-with-no-symbol-file.exp: sysroot=target:: action=delete: connection to GDBserver succeeded (the program is no longer running) A patched GDB should have full passes. gdb/testsuite/ChangeLog: 2016-04-13 Luis Machado <lgustavo@codesourcery.com> * gdb.server/connect-with-no-symbol-file.c: New file. * gdb.server/connect-with-no-symbol-file.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.server/connect-with-no-symbol-file.c')
-rw-r--r--gdb/testsuite/gdb.server/connect-with-no-symbol-file.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c
new file mode 100644
index 0000000..bb11da2
--- /dev/null
+++ b/gdb/testsuite/gdb.server/connect-with-no-symbol-file.c
@@ -0,0 +1,22 @@
+/* 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/>. */
+
+int
+main (int argc, char **argv)
+{
+ return 0;
+}