diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-12 19:15:01 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-02-12 19:15:01 +0000 |
commit | 570083757caf694cbcf250a64f88709a8676aacf (patch) | |
tree | aabe688a01f31dd464a008d37466b355bdad33a0 /gdb/testsuite | |
parent | 8e43fc024d16859a34c2f2aa88b419e677373f88 (diff) | |
download | gdb-570083757caf694cbcf250a64f88709a8676aacf.zip gdb-570083757caf694cbcf250a64f88709a8676aacf.tar.gz gdb-570083757caf694cbcf250a64f88709a8676aacf.tar.bz2 |
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')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.server/server-exec-info.exp | 29 |
2 files changed, 33 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f0eab1c..4de1457 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2012-02-12 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.server/server-exec-info.exp: New file. + 2012-02-10 Pedro Alves <palves@redhat.com> * gdb.base/break-interp.exp (test_attach_gdb): Assume $file is 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 0000000..3d773af --- /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>" |