summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.server
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-02-12 19:15:00 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-02-12 19:15:00 +0000
commitccff2bf2f0215f91ae09757c473dac6fb8f0dce7 (patch)
treea491bb93210da62e43bfdf939ad9d29b67ced8e2 /gdb/testsuite/gdb.server
parent59d38a1f1c2c6546f64d95b6ebef1a7730bbcfd5 (diff)
downloadgdb-ccff2bf2f0215f91ae09757c473dac6fb8f0dce7.tar.gz
gdb/
Fix crash on loaded shlibs without loaded exec_bfd. * exec.c (exec_files_info): Do not crash on NULL EXEC_BFD. (set_section_command): Replace exec_bfd by p->bfd. gdb/testsuite/ * gdb.server/server-exec-info.exp: New file.
Diffstat (limited to 'gdb/testsuite/gdb.server')
-rw-r--r--gdb/testsuite/gdb.server/server-exec-info.exp29
1 files changed, 29 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.server/server-exec-info.exp b/gdb/testsuite/gdb.server/server-exec-info.exp
new file mode 100644
index 00000000000..3d773afc7d8
--- /dev/null
+++ b/gdb/testsuite/gdb.server/server-exec-info.exp
@@ -0,0 +1,29 @@
+# Copyright (C) 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/>.
+
+load_lib gdbserver-support.exp
+
+set testfile "no-execfile-info"
+set srcfile "server.c"
+#if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1} {
+if [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] {
+ return -1
+}
+
+gdb_test "file" ".*" "file" \
+ {Discard symbol table from `.*'\? \(y or n\) } "y"
+gdbserver_run ""
+gdb_test "set sysroot remote:"
+gdb_test "info files" "\r\nLocal exec file:\r\n\t<no file loaded>"