aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/solib-symbol-lib.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-07-03 12:14:44 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-07-03 12:14:44 +0000
commit3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb (patch)
tree24c19c39630f502332f0e3042a9662c3f20019ad /gdb/testsuite/gdb.base/solib-symbol-lib.c
parent3ccac826a3edc921e1e6c5ded9502781cca509af (diff)
downloadgdb-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.zip
gdb-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.tar.gz
gdb-3a40aaa0eb849a9aacd6f1e83b94fb8b0947cdfb.tar.bz2
2007-07-03 Markus Deuling <deuling@de.ibm.com>
* cp-namespace.c (lookup_symbol_file): Add block to lookup_symbol_global call. * Makefile.in (solist_h): Add dependency on symtab header. (symtab.o): Add dependency on solist header. * solib.c (solib_global_lookup): New function. * solib-svr4.c (scan_dyntag): Likewise. (elf_locate_base): Call helper routine scan_dyntag. (elf_lookup_lib_symbol): New function. (_initialize_svr4_solib): Add elf_lookup_lib_symbol to svr4_so_ops. * solist.h (symtab.h): New include. (struct target_so_ops): New member lookup_lib_global_symbol. (solib_global_lookup): New prototype. * symtab.c: New include solist.h. (lookup_objfile_from_block): New function. (lookup_global_symbol_from_objfile): New function. (basic_lookup_symbol_nonlocal): Add block to lookup_symbol_global call. (lookup_symbol_global): Call library-specific lookup procedure. * symtab.h (lookup_global_symbol_from_objfile): New prototype. * NEWS: Document framework. testsuite/ * gdb.base/solib-symbol.exp: New file (testcase multiple symbol lookup). * gdb.base/solib-symbol-lib.c: Likewise. * gdb.base/solib-symbol-main.c: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/solib-symbol-lib.c')
-rw-r--r--gdb/testsuite/gdb.base/solib-symbol-lib.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/solib-symbol-lib.c b/gdb/testsuite/gdb.base/solib-symbol-lib.c
new file mode 100644
index 0000000..45f72b6
--- /dev/null
+++ b/gdb/testsuite/gdb.base/solib-symbol-lib.c
@@ -0,0 +1,32 @@
+/* Copyright 2007 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 2 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ Contributed by Markus Deuling <deuling@de.ibm.com>.
+*/
+#include <stdio.h>
+
+void
+foo ()
+{
+ printf ("foo in lib\n");
+ return;
+}
+
+void
+foo2()
+{
+ printf ("foo2 in lib\n");
+ return;
+}