From a3247a22136e0b53cf5c40c67ee4f5e8eb92ec32 Mon Sep 17 00:00:00 2001 From: Paul Pluzhnikov Date: Thu, 5 Mar 2009 23:45:14 +0000 Subject: 2009-03-05 Paul Pluzhnikov * printcmd.c (do_one_display): Reparse exp_string. (display_uses_solib_p): New function. (clear_dangling_display_expressions): New function. (_initialize_printcmd): Add observer. * solib.c (no_shared_libraries): Swap order of calls to clear_solib and objfile_purge_solibs. --- gdb/testsuite/gdb.base/solib-display-lib.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 gdb/testsuite/gdb.base/solib-display-lib.c (limited to 'gdb/testsuite/gdb.base/solib-display-lib.c') diff --git a/gdb/testsuite/gdb.base/solib-display-lib.c b/gdb/testsuite/gdb.base/solib-display-lib.c new file mode 100644 index 0000000..18cb257 --- /dev/null +++ b/gdb/testsuite/gdb.base/solib-display-lib.c @@ -0,0 +1,30 @@ +/* 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 . */ + +int a_global = 41; +#ifndef NO_B_GLOBAL +int b_global = 42; +#endif +int c_global = 43; + +int foo () { + return a_global + +#ifndef NO_B_GLOBAL + b_global + +#endif + c_global; +} -- cgit v1.1