aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/unloadshr2.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-12-23 22:24:51 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-12-23 22:24:51 +0000
commit859825b8578d03e0fd93ec5946297c6c8bc2e637 (patch)
treede48e7a914ac2b25d9e031de6bba6eee255c4b57 /gdb/testsuite/gdb.base/unloadshr2.c
parentf747b78daab5cdb984599facaff322ee9cdfa49b (diff)
downloadgdb-859825b8578d03e0fd93ec5946297c6c8bc2e637.zip
gdb-859825b8578d03e0fd93ec5946297c6c8bc2e637.tar.gz
gdb-859825b8578d03e0fd93ec5946297c6c8bc2e637.tar.bz2
gdb/
* breakpoint.c (bpstat_stop_status): Check BL->SHLIB_DISABLED. (print_breakpoint_location): New comment. Check LOC->SHLIB_DISABLED. Check LOC validity before printing it. Use LOC instead of B->LOC. Swap the if conditionals order. gdb/testsuite/ * gdb.base/unload.c (main): Change the UNLOADSHR parameter to 1. Replace the printf call of Y by provided "y-set-1" label. New block for the second shared library. * gdb.base/unload.exp: Compile also the second library, call gdb_load_shlibs also for it. Use now gdb_breakpoint. (single pending breakpoint info): Rename to ... (pending breakpoint info before run): ... this extended test. (libfile2, libname2, libsrcfile2, libsrc2) (lib_sl2): New variables. (exec_opts): Set also SHLIB_NAME2. (pending breakpoint info on first run at shrfunc1) (pending breakpoint info on second run at shrfunc1) (pending breakpoint info on second run at shrfunc2) (print y from libfile, print y from libfile2): New tests. * gdb.base/unloadshr.c (shrfunc1): Change the returned value. * gdb.base/unloadshr2.c: New.
Diffstat (limited to 'gdb/testsuite/gdb.base/unloadshr2.c')
-rw-r--r--gdb/testsuite/gdb.base/unloadshr2.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/unloadshr2.c b/gdb/testsuite/gdb.base/unloadshr2.c
new file mode 100644
index 0000000..94b74b9
--- /dev/null
+++ b/gdb/testsuite/gdb.base/unloadshr2.c
@@ -0,0 +1,24 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2009 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/>. */
+
+#include <stdio.h>
+
+int
+shrfunc2 (int x)
+{
+ return x * 100; /* unloadshr2 break */
+}